4 <p>This test ensures setting location.href with javascript scheme properly executes the script even while beforeunload event is being fired. You should see PASS
1/
2 and PASS
2/
2 below:
</p>
5 <pre id=
"log">FAIL
</pre>
8 if (window
.testRunner
) {
9 testRunner
.dumpAsText();
10 testRunner
.waitUntilDone();
13 var log
= document
.getElementById('log');
15 function test(iframe
) {
19 iframe
.contentWindow
.location
.href
= 'resources/before-unload-in-subframe-child.html';
23 log
.innerHTML
= 'PASS';
24 if (window
.testRunner
)
25 testRunner
.notifyDone();
28 function fired(contentWindow
) {
29 location
.href
= 'javascript:top.done()';
33 <iframe onload=
"test(this);" src=
"resources/before-unload-in-subframe-child.html"></iframe>