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/window-management/multi-screen-fullscreen-move.tentative.https.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/window-management/multi-screen-fullscreen-move.tentative.https.html')
-rw-r--r-- | testing/web-platform/tests/window-management/multi-screen-fullscreen-move.tentative.https.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/web-platform/tests/window-management/multi-screen-fullscreen-move.tentative.https.html b/testing/web-platform/tests/window-management/multi-screen-fullscreen-move.tentative.https.html new file mode 100644 index 0000000000..b91ee4cdc4 --- /dev/null +++ b/testing/web-platform/tests/window-management/multi-screen-fullscreen-move.tentative.https.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<meta name="timeout" content="long"> +<title>Window Management test: target-screen element.requestFullscreen()</title> +<link rel="help" href="https://w3c.github.io/window-management/"> +Tests use of multi-screen details to move fullscreen between screens.<br> +The host device must have 2+ screens to yield meaningful results.<br><br> +<ul id="list"></ul> +<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="resources/helpers.js"></script> +<script> +'use strict'; + +promise_test(async test => { + await setUpWindowManagement(test); + const originalScreen = window.screenDetails.currentScreen; + // Request fullscreen on the current screen; the window should stay there. + await buttonClick(test, `Request fullscreen on '${originalScreen.label}'`); + await document.documentElement.requestFullscreen({ screen: originalScreen }); + await assertWindowOnScreen(window, originalScreen); + assert_true(!!document.fullscreenElement); + + for (const s of window.screenDetails.screens) { + // Request fullscreen on screen `s`; `window` should move there. + await buttonClick(test, `Request fullscreen on '${s.label}'`); + await document.documentElement.requestFullscreen({ screen: s }); + await assertWindowOnScreen(window, s); + assert_true(!!document.fullscreenElement); + } + + // Exit fullscreen; `window` should move back to `originalScreen`. + await buttonClick(test, `Exit fullscreen`); + await document.exitFullscreen(); + await assertWindowOnScreen(window, originalScreen); + assert_false(!!document.fullscreenElement); +}, 'Use multi-screen details to move fullscreen between screens'); +</script> |