tor-browser

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

test_location_href_unknown_protocol.html (679B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>Test for window.location setter to an unknown protocol (bug 1528305).</title>
      4 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      5 <script>
      6 SimpleTest.waitForExplicitFinish();
      7 let beforeunload = false;
      8 let unload = false;
      9 
     10 window.onChildBeforeUnload = function() {
     11  beforeunload = true;
     12 };
     13 
     14 window.onChildUnload = function() {
     15  unload = true;
     16 };
     17 
     18 let win;
     19 window.onChildLoadTimedOut = function() {
     20  ok(!unload, "shouldn't have unloaded child window");
     21  ok(beforeunload, "should've fired a beforeunload event");
     22  win.close();
     23  SimpleTest.finish();
     24 };
     25 
     26 win = window.open("file_location_href_unknown_protocol.html");
     27 </script>