tor-browser

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

beforeunload-sticky-activation-manual.html (741B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Beforeunload must be gated behind sticky activation: normal top-level browsing context</title>
      4 
      5 <p>This test is manual because we want to test non-popup, non-iframe situations. Sibling files contain automated tests for those situations.
      6 
      7 <p>In three seconds, this document will redirect itself to a new page. The test passes if the redirect succeeds. The test fails if a beforeunload dialog pops up asking for confirmation.
      8 
      9 <p>Be sure not to interact with any part of the page in the meantime. That would invalidate the results.
     10 
     11 <script>
     12 window.onbeforeunload = e => e.preventDefault();
     13 
     14 setTimeout(() => {
     15  location.href = 'support/beforeunload-sticky-destination.html';
     16 }, 3000);
     17 </script>