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>
11 See note in sibling -dialog.html file.
16 const type
= "CloseWatcher";
18 promise_test(async t
=> {
21 createRecordingCloseWatcher(t
, events
, "watcher1", type
);
22 const watcher2
= createRecordingCloseWatcher(t
, events
, "watcher2", type
);
24 await
maybeTopLayerBless(watcher2
);
26 await
sendCloseRequest();
27 await
waitForPotentialCloseEvent();
28 assert_array_equals(events
, ["watcher2 cancel", "watcher2 close", "watcher1 cancel", "watcher1 close"]);
29 }, "Create two CloseWatchers without user activation; send user activation");