tor-browser

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

popup.html (924B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Actions in popup</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/resources/testdriver.js"></script>
      7 <script src="/resources/testdriver-vendor.js"></script>
      8 
      9 <script>
     10  promise_test((t) => new Promise((resolve, reject) => {
     11    addEventListener("message", (msg) => {
     12      if (msg.data === "PASS") {
     13        resolve();
     14      } else if (msg.data === "FAIL") {
     15        reject("actions failed");
     16      } else {
     17        reject("testdriver.js-internal messages should not be exposed to tests");
     18      }
     19    });
     20    addEventListener("click", (event) => {
     21      reject("Test window received click meant for the popup");
     22    });
     23 
     24    let popup = window.open("support/actions.html?popup", "_blank");
     25    t.add_cleanup(() => popup.close());
     26  }), "Actions go to the popup and not the test window");
     27 </script>