tor-browser

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

unload-bubbles.html (615B)


      1 <!doctype html>
      2 <title>visibilitychange event bubbles when fired on unload</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <div id="log"></div>
      6 <script>
      7 async_test(function(t) {
      8  var w = window.open("resources/unload-bubbles.html");
      9  window.onmessage = t.step_func(function(event) {
     10    if (event.data === "close") {
     11      w.close();
     12      return;
     13    }
     14 
     15    const {state, target, bubbles} = event.data
     16    assert_equals(state, "hidden");
     17    assert_equals(target, "#document");
     18    assert_equals(bubbles, true);
     19    t.done();
     20  });
     21 });
     22 </script>