tor-browser

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

002.html (1050B)


      1 <!doctype html>
      2 <title>pagehide event properties</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 onload = function() {setTimeout(function() {
     10  var iframe = document.getElementsByTagName("iframe")[0]
     11 
     12  iframe.onload = function() {
     13                    setTimeout(function() {
     14                                 iframe.contentWindow.location="001-2.html";
     15                               }, 100);
     16                    iframe.onload = t.step_func(function() {t.done()});
     17                  };
     18 
     19  function do_test(e) {
     20    assert_equals(e.type, "pagehide");
     21    assert_equals(e.target, iframe.contentDocument);
     22    assert_equals(e.currentTarget, iframe.contentWindow);
     23 
     24    // https://github.com/whatwg/html/issues/6794
     25    assert_true(e.bubbles, "bubbles");
     26    assert_true(e.cancelable, "cancelable");
     27 
     28    assert_true(e.persisted, "persisted");
     29  }
     30 
     31  iframe.src = "002-1.html?" + Math.random();
     32 
     33 }, 100)};
     34 
     35 </script>
     36 <iframe></iframe>