001.html (744B)
1 <!doctype html> 2 <title>pagehide event on unload</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <div id="log"></div> 6 <script> 7 pagehide_fired = false; 8 var t = async_test(); 9 10 onload = function() {setTimeout(function() { 11 var iframe = document.getElementsByTagName("iframe")[0] 12 13 iframe.onload = function() { 14 setTimeout(function() { 15 iframe.contentWindow.location="001-2.html"; 16 }, 100); 17 iframe.onload = t.step_func(function() {assert_true(pagehide_fired); t.done()}); 18 }; 19 20 iframe.src = "001-1.html?" + Math.random(); 21 22 }, 100)}; 23 24 </script> 25 <iframe></iframe>