tor-browser

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

1881375-1.html (808B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <script>
      4 // Loop count for the handler below. This value seems to be enough for the
      5 // crashtest to be likely to trigger the crash.
      6 const MAX_LOADS = 3;
      7 let loadCount = 0;
      8 
      9 // Handler which gets invoked by the iframe whenever it completes a load
     10 // (and dynamically reloads itself). This lets us allow the testcase to
     11 // reload over and over (as seems to be required to trigger the crash),
     12 // while also keeping the test duration reasonably bounded.
     13 window.addEventListener(
     14  "message",
     15  (event) => {
     16    if (loadCount++ == MAX_LOADS) {
     17      // After MAX_LOADS reloads of the iframe, call ourselves done.
     18      myIframe.remove();
     19      document.documentElement.className = "";
     20    }
     21  }
     22 );
     23 
     24 </script>
     25 <iframe id="myIframe" src="1881375-1-helper.html"></iframe>