tor-browser

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

004.html (684B)


      1 <!doctype html>
      2 <title>salvagable state of document after setting beforeunload listener</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <div id="log"></div>
      6 <script>
      7 var t = async_test();
      8 
      9 var loaded = false;
     10 var beforeunload_fired = false;
     11 var timeout_fired = false;
     12 
     13 function start_test() {
     14  step_timeout(
     15    t.step_func(function() {
     16      assert_true(beforeunload_fired);
     17      assert_false(timeout_fired);
     18      t.done()
     19    }), 1000);
     20 }
     21 
     22 onload = function() {
     23  var iframe = document.getElementsByTagName("iframe")[0]
     24  onload = null;
     25  iframe.src="004-1.html?" + Math.random();
     26 };
     27 
     28 </script>
     29 <iframe></iframe>