diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/html/rendering/replaced-elements/embedded-content | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/rendering/replaced-elements/embedded-content')
14 files changed, 151 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/audio-controls-intrinsic-size.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/audio-controls-intrinsic-size.html new file mode 100644 index 0000000000..6cbbcd02f5 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/audio-controls-intrinsic-size.html @@ -0,0 +1,25 @@ +<!doctype html> +<title>Audio intrinsic size doesn't depend on its max size</title> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1683979"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div style="display: inline-block"> + <audio controls style="max-width: 99%" id="test"></audio> +</div> +<script> +let audio = document.getElementById("test"); + +function computeSize() { + return audio.getBoundingClientRect().width; +} + +let size = computeSize(); +async_test(function(t) { + requestAnimationFrame(t.step_func(function() { + assert_equals(computeSize(), size, "Shouldn't have changed size"); + requestAnimationFrame(t.step_func_done(function() { + assert_equals(computeSize(), size, "Shouldn't have changed size"); + })); + })); +}); +</script> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/change-src-while-not-displayed-ref.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/change-src-while-not-displayed-ref.html new file mode 100644 index 0000000000..96500cf0bd --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/change-src-while-not-displayed-ref.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<embed style="display:block;" src="data:text/html,PASS"> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/change-src-while-not-displayed.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/change-src-while-not-displayed.html new file mode 100644 index 0000000000..521a816337 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/change-src-while-not-displayed.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1240261"> +<link rel="match" href="change-src-while-not-displayed-ref.html"> +<embed id="embed" style="display:block;" src="data:text/html,FAIL"> +<script> + onload = function() { + document.body.offsetTop; + embed.style.display = "none"; + document.body.offsetTop; + embed.src = "data:text/html,PASS"; + document.body.offsetTop; + embed.style.display = "block"; + requestAnimationFrame(()=> { + requestAnimationFrame(()=> { + document.documentElement.classList.remove('reftest-wait'); + }); + }); + } +</script> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe-in-multicol.sub-ref.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe-in-multicol.sub-ref.html new file mode 100644 index 0000000000..2645ed459f --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe-in-multicol.sub-ref.html @@ -0,0 +1,3 @@ +<!doctype html> +<div style="height: 100px"></div> +<iframe id=myframe src="/images/green.png"></iframe> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe-in-multicol.sub.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe-in-multicol.sub.html new file mode 100644 index 0000000000..e39e2bc764 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe-in-multicol.sub.html @@ -0,0 +1,21 @@ +<!doctype html> +<html class="reftest-wait"> +<title>Rendering of cross-domain iframe element in multicol</title> +<link rel="match" href="cross-domain-iframe-in-multicol.sub-ref.html"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#embedded-content-rendering-rules"> +<meta name="assert" content="Checks that cross-domain iframe in multicol is correctly rendered"> +<div style="columns: 2; height: 300px"> + <div style="height: 100px"></div> + <iframe id=myframe src="http://{{domains[www1]}}:{{ports[http][0]}}/images/green.png"></iframe> + <div style="height: 100px"></div> +</div> +<script> + myframe.onload = () => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + document.documentElement.classList.remove('reftest-wait'); + }); + }); + } +</script> +</html> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe.sub-ref.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe.sub-ref.html new file mode 100644 index 0000000000..a3579eee74 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe.sub-ref.html @@ -0,0 +1,3 @@ +<!doctype html> +<title>Test reference</title> +<iframe src="/images/green.png"></iframe> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe.sub.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe.sub.html new file mode 100644 index 0000000000..8d9b8cd5b4 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe.sub.html @@ -0,0 +1,17 @@ +<!doctype html> +<html class="reftest-wait"> +<title>Rendering of iframe element with src attribute from another domain</title> +<link rel="match" href="cross-domain-iframe.sub-ref.html"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#embedded-content-rendering-rules"> +<meta name="assert" content="Checks that iframe content is correctly rendered even if it is retrieved from a different domain."> +<iframe id=myframe src="http://{{domains[www1]}}:{{ports[http][0]}}/images/green.png"></iframe> +<script> + myframe.onload = () => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + document.documentElement.classList.remove('reftest-wait'); + }); + }); + } +</script> +</html> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/object-fallback-text-decoration-ref.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/object-fallback-text-decoration-ref.html new file mode 100644 index 0000000000..9481e80ac8 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/object-fallback-text-decoration-ref.html @@ -0,0 +1,3 @@ +<!doctype html> +<title>Test reference</title> +<span style="text-decoration:underline">This text should be underlined.</span> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/object-fallback-text-decoration.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/object-fallback-text-decoration.html new file mode 100644 index 0000000000..89657ef8a2 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/object-fallback-text-decoration.html @@ -0,0 +1,9 @@ +<!doctype html> +<title>Rendering of object element fallback with text-decoration</title> +<link rel="match" href="object-fallback-text-decoration-ref.html"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#embedded-content-rendering-rules"> +<meta name="assert" content="Checks that text-decoration applies to rendered object fallback."> +<style> + object { text-decoration: underline; } +</style> +<object>This text should be underlined.</object> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/resources/tall.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/resources/tall.html new file mode 100644 index 0000000000..3de84d0b3f --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/resources/tall.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<body style="background: blue"> + <div style="position: fixed; left: 0; top: 0; width: 100%; height: 100px; background: yellow"></div> + <div style="position: fixed; left: 0; bottom: 0; width: 100%; height: 100px; background: green"></div> + <div style="height: 2000px"></div> +</body> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/tall-cross-domain-iframe-in-scrolled.sub-ref.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/tall-cross-domain-iframe-in-scrolled.sub-ref.html new file mode 100644 index 0000000000..01c1e2f86f --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/tall-cross-domain-iframe-in-scrolled.sub-ref.html @@ -0,0 +1,9 @@ +<!doctype html> +<html class="reftest-wait"> +<iframe id=myframe style="width: 300px; height: 1000px" src="resources/tall.html"></iframe> +<div style="height: 2000px"></div> +<script> + window.scrollTo(0, 700); + myframe.onload = () => document.documentElement.classList.remove('reftest-wait'); +</script> +</html> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/tall-cross-domain-iframe-in-scrolled.sub.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/tall-cross-domain-iframe-in-scrolled.sub.html new file mode 100644 index 0000000000..865be7c883 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/tall-cross-domain-iframe-in-scrolled.sub.html @@ -0,0 +1,20 @@ +<!doctype html> +<html class="reftest-wait"> +<title>Rendering of tall cross-domain iframe element in a scrolled window</title> +<link rel="match" href="tall-cross-domain-iframe-in-scrolled.sub-ref.html"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#embedded-content-rendering-rules"> +<meta name="assert" content="Checks that tall cross-domain iframe in a scrolled window is correctly rendered"> +<iframe id=myframe style="width: 300px; height: 1000px" + src="http://{{domains[www1]}}:{{ports[http][0]}}/html/rendering/replaced-elements/embedded-content/resources/tall.html"></iframe> +<div style="height: 2000px"></div> +<script> + window.scrollTo(0, 700); + myframe.onload = () => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + document.documentElement.classList.remove('reftest-wait'); + }); + }); + } +</script> +</html> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/video-controls-vertical-writing-mode-ref.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/video-controls-vertical-writing-mode-ref.html new file mode 100644 index 0000000000..9a2d1d0641 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/video-controls-vertical-writing-mode-ref.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<div> + <video controls /> +</div> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/video-controls-vertical-writing-mode.html b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/video-controls-vertical-writing-mode.html new file mode 100644 index 0000000000..d124396ab2 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/embedded-content/video-controls-vertical-writing-mode.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>Video controls rendering in vertical-lr</title> +<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#embedded-content-rendering-rules" /> +<link rel="match" href="video-controls-vertical-writing-mode-ref.html" /> +<div style="writing-mode:vertical-lr"> + <video controls /> +</div> |