nnn-dialog.html (980B)
1 <!doctype html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testdriver.js"></script> 5 <script src="/resources/testdriver-vendor.js"></script> 6 <script src="/resources/testdriver-actions.js"></script> 7 <script src="/common/top-layer.js"></script> 8 <script src="../resources/helpers.js"></script> 9 10 <body> 11 <script> 12 const type = "dialog"; 13 14 promise_test(async t => { 15 const events = []; 16 17 createRecordingCloseWatcher(t, events, "watcher1", type); 18 createRecordingCloseWatcher(t, events, "watcher2", type); 19 createRecordingCloseWatcher(t, events, "watcher3", type); 20 21 await sendCloseRequest(); 22 await waitForPotentialCloseEvent(); 23 assert_array_equals(events, ["watcher3 cancel[cancelable=false]", "watcher2 cancel[cancelable=false]", "watcher1 cancel[cancelable=false]", "watcher3 close", "watcher2 close", "watcher1 close"]); 24 }, "Create three close watchers without user activation"); 25 </script>