nn-activate-dialog.html (932B)
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 const watcher2 = createRecordingCloseWatcher(t, events, "watcher2", type); 19 20 await maybeTopLayerBless(watcher2); 21 22 await sendCloseRequest(); 23 await waitForPotentialCloseEvent(); 24 assert_array_equals(events, ["watcher2 cancel[cancelable=true]", "watcher1 cancel[cancelable=true]", "watcher2 close", "watcher1 close"]); 25 }, "Create two dialogs without user activation; send user activation"); 26 </script>