001-1.html (975B)
1 <!DOCTYPE HTML> 2 <script> 3 t = opener.t; 4 do_test = t.step_func(function () { 5 localStorage.test6564729 += '4'; 6 var d = document; 7 var e = document.open(); // has no effect (ignore-opens-during-unload > 0) 8 localStorage.test6564729 += (e == d) ? '5' : 'A [' + e + '] '; 9 document.write('FAIL - document.write executed and blocked navigation!'); // has no effect (ignore-opens-during-unload > 0) 10 localStorage.test6564729 += document.body.textContent.match('FAIL') ? 'B' : '6'; 11 document.close(); // has no effect (no script-created parser) 12 localStorage.test6564729 += '7'; 13 }) 14 onload = t.step_func(function() { 15 localStorage.test6564729 = '0'; 16 setTimeout(t.step_func(function() {document.links[0].click()})); 17 }); 18 </script> 19 <body onbeforeunload="localStorage.test6564729 += '1'" 20 onpagehide="localStorage.test6564729 += '3'" 21 onunload="do_test()"> 22 <p><a href="001a.html">Follow this link to run the test.</a> 23 <p><iframe src="001b.html"></iframe>