tor-browser

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

007.html (781B)


      1 <!doctype html>
      2 <title>salvagable state of document after setting unload 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 unload_fired = false;
     11 var timeout_fired = false;
     12 
     13 function start_test() {
     14  step_timeout(t.step_func(function() {
     15                             assert_true(unload_fired);
     16                             assert_false(timeout_fired);
     17                             t.done()
     18                         }), 1000);
     19 }
     20 
     21 onload = function() {setTimeout(function() {
     22  var iframe = document.getElementsByTagName("iframe")[0]
     23  onload = null;
     24  iframe.src="007-1.html?" + Math.random();
     25 }, 100)};
     26 
     27 </script>
     28 <iframe></iframe>