tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ynn-dialog.html (1246B)


      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  await createBlessedRecordingCloseWatcher(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]", "watcher3 close", "watcher2 close"]);
     24 
     25  await sendCloseRequest();
     26  await waitForPotentialCloseEvent();
     27  assert_array_equals(events, ["watcher3 cancel[cancelable=false]", "watcher2 cancel[cancelable=false]", "watcher3 close", "watcher2 close", "watcher1 cancel[cancelable=false]", "watcher1 close"]);
     28 }, "Create a close watcher with user activation; create two close watchers without user activation");
     29 </script>