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/fullscreen/api/fullscreen-display-contents.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/fullscreen/api/fullscreen-display-contents.html')
-rw-r--r-- | testing/web-platform/tests/fullscreen/api/fullscreen-display-contents.html | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fullscreen/api/fullscreen-display-contents.html b/testing/web-platform/tests/fullscreen/api/fullscreen-display-contents.html new file mode 100644 index 0000000000..fc6f232747 --- /dev/null +++ b/testing/web-platform/tests/fullscreen/api/fullscreen-display-contents.html @@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <title> + Test that display:contents on fullscreen elements acts like + display:block + </title> + <meta charset="utf-8" /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-vendor.js"></script> + <script src="../trusted-click.js"></script> + <link rel="author" href="mailto:masonf@chromium.org" /> + <link + rel="help" + href="https://fullscreen.spec.whatwg.org/#new-stacking-layer" + /> + <div id="target"></div> + <style> + #target { + display: contents; + background-color: green; + } + #target::backdrop { + display: contents; + } + </style> + + <script> + promise_test(async (t) => { + const target = document.querySelector("#target"); + await test_driver.bless("fullscreen"); + await target.requestFullscreen(); + await new Promise((resolve) => requestAnimationFrame(resolve)); + assert_equals(document.fullscreenElement, target); + assert_equals( + getComputedStyle(target).display, + "block", + "fullscreen element should have display:block" + ); + assert_equals( + getComputedStyle(target, "::backdrop").display, + "block", + "fullscreen element's ::backdrop should have display:block" + ); + await document.exitFullscreen(); + new Promise((resolve) => requestAnimationFrame(resolve)); + assert_equals(document.fullscreenElement, null); + assert_equals( + getComputedStyle(target).display, + "contents", + "fullscreen element should have display:contents after exiting fullscreen" + ); + }); + </script> +</html> |