tor-browser

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

beforeunload-sticky-activation-popup.html (754B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Beforeunload must be gated behind sticky activation: auxiliary browsing context</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 
      7 <p>If you happen to be running this test as a human, then be sure not to interact with any part of the page; that would invalidate the results!
      8 
      9 <script>
     10 setup({ single_test: true });
     11 
     12 const w = window.open('support/beforeunload-sticky-start.html');
     13 
     14 window.onmessage = e => {
     15  assert_equals(e.data, 'navigated successfully');
     16 
     17  const desiredURL = (new URL('support/beforeunload-sticky-destination.html', location.href)).href;
     18  assert_equals(w.location.href, desiredURL);
     19 
     20  w.close();
     21 
     22  done();
     23 };
     24 </script>