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/close-watcher/user-activation-multiple-plus-free.html | |
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/close-watcher/user-activation-multiple-plus-free.html')
-rw-r--r-- | testing/web-platform/tests/close-watcher/user-activation-multiple-plus-free.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/web-platform/tests/close-watcher/user-activation-multiple-plus-free.html b/testing/web-platform/tests/close-watcher/user-activation-multiple-plus-free.html new file mode 100644 index 0000000000..8a86624913 --- /dev/null +++ b/testing/web-platform/tests/close-watcher/user-activation-multiple-plus-free.html @@ -0,0 +1,32 @@ +<!doctype html> +<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/testdriver-actions.js"></script> +<script src="resources/helpers.js"></script> + +<div id="d" style="height: 100px; width: 100px;"></div> +<script> + +// This test needs to be separate from user-activation.html since, unlike those, +// it relies on there not being any lingering user activation from previous +// tests hanging around. That is, we need to be sure freeWatcher is created with +// no user activation, to ensure that activationWatcher1 and activationWatcher2 +// get grouped as expected. +promise_test(async t => { + const events = []; + createRecordingCloseWatcher(t, events, "freeWatcher"); + + await test_driver.bless("create two more CloseWatchers", () => { + createRecordingCloseWatcher(t, events, "activationWatcher1"); + createRecordingCloseWatcher(t, events, "activationWatcher2"); + }); + + await sendCloseSignal(); + assert_array_equals(events, ["activationWatcher2 close", "activationWatcher1 close"]); + + await sendCloseSignal(); + assert_array_equals(events, ["activationWatcher2 close", "activationWatcher1 close", "freeWatcher close"]); +}, "Multiple CloseWatchers created from a single user activation close together, but original free CloseWatcher closes separately"); +</script> |