diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-param-url.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-param-url.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-param-url.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-param-url.html b/testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-param-url.html new file mode 100644 index 0000000000..5f1e54c4d9 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-param-url.html @@ -0,0 +1,41 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>object element containing param element specifying a URL</title> +<link rel="author" href="mailto:masonf@chromium.org"> +<link rel="help" href="https://github.com/whatwg/html/pull/7816"> +<link rel=match href="object-param-url-ref.html"> + +<style> + div { + width:300px; + height:80px; + border:1px solid black; + margin: 5px; + overflow: hidden; + } +</style> +<body> +<script> +const smallPdf = 'JVBERi0xLjIgCjkgMCBvYmoKPDwKPj4Kc3RyZWFtCkJULyA5IFRmKFRlc3QpJyBFVAplbmRzdHJlYW0KZW5kb2JqCjQgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL1BhcmVudCA1IDAgUgovQ29udGVudHMgOSAwIFIKPj4KZW5kb2JqCjUgMCBvYmoKPDwKL0tpZHMgWzQgMCBSIF0KL0NvdW50IDEKL1R5cGUgL1BhZ2VzCi9NZWRpYUJveCBbIDAgMCA5OSA5IF0KPj4KZW5kb2JqCjMgMCBvYmoKPDwKL1BhZ2VzIDUgMCBSCi9UeXBlIC9DYXRhbG9nCj4+CmVuZG9iagp0cmFpbGVyCjw8Ci9Sb290IDMgMCBSCj4+CiUlRU9G'; +const dataUrl = `data:application/pdf;base64,${smallPdf}`; + +function addOne(html) { + const wrapper = document.createElement('div'); + wrapper.innerHTML = html; + const objectElement = wrapper.querySelector('object'); + document.body.appendChild(wrapper); +} + +// This should be one <object> that loads a PDF, and the rest that don't. +addOne(`<object data=${dataUrl}></object>`); +addOne(`<object><param name=src value=${dataUrl}></object>`); +addOne(`<object><param name=data value=${dataUrl}></object>`); +addOne(`<object><param name=code value=${dataUrl}></object>`); +addOne(`<object><param name=movie value=${dataUrl}></object>`); +addOne(`<object><param name=url value=${dataUrl}></object>`); + +// Not a great way to tell when any <object> that might load has loaded. +setTimeout(() => document.documentElement.classList.remove("reftest-wait"),2000); + +</script> |