diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-input-image.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-input-image.html')
-rw-r--r-- | testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-input-image.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-input-image.html b/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-input-image.html new file mode 100644 index 0000000000..7d603eaf58 --- /dev/null +++ b/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-input-image.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<link rel="author" href="mailto:jarhar@chromium.org"> +<link rel="help" href="http://crbug.com/1247417"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<div style="content-visibility:hidden" id=container1></div> +<div style="content-visibility:hidden" id=container2></div> + +<script> +promise_test(async () => { + const image1 = document.createElement('input'); + image1.type = 'image'; + const image1Load = new Promise(resolve => { + image1.addEventListener('load', resolve); + }); + image1.src = 'resources/dice.png'; + container1.appendChild(image1); + await image1Load; + assert_not_equals(image1.width, 0, 'width'); + + const image2 = document.createElement('input'); + image2.type = 'image'; + const image2Load = new Promise(resolve => { + image2.addEventListener('load', resolve); + }); + image2.src = 'resources/dice.png'; + container2.appendChild(image2); + await image2Load; + assert_not_equals(image2.height, 0, 'height'); + +}, `<input type=image> should return nonzero values for width and height in a c-v:hidden subtree.`); +</script> |