summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/close-watcher/user-activation/nn-dialog.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /testing/web-platform/tests/close-watcher/user-activation/nn-dialog.html
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/close-watcher/user-activation/nn-dialog.html')
-rw-r--r--testing/web-platform/tests/close-watcher/user-activation/nn-dialog.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/web-platform/tests/close-watcher/user-activation/nn-dialog.html b/testing/web-platform/tests/close-watcher/user-activation/nn-dialog.html
new file mode 100644
index 0000000000..0d086a525e
--- /dev/null
+++ b/testing/web-platform/tests/close-watcher/user-activation/nn-dialog.html
@@ -0,0 +1,24 @@
+<!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="/common/top-layer.js"></script>
+<script src="../resources/helpers.js"></script>
+
+<body>
+<script>
+const type = "dialog";
+
+promise_test(async t => {
+ const events = [];
+
+ createRecordingCloseWatcher(t, events, "watcher1", type);
+ createRecordingCloseWatcher(t, events, "watcher2", type);
+
+ await sendCloseRequest();
+ await waitForPotentialCloseEvent();
+ assert_array_equals(events, ["watcher2 cancel[cancelable=false]", "watcher1 cancel[cancelable=false]", "watcher2 close", "watcher1 close"]);
+}, "Create two close watchers without user activation");
+</script>