1 <script src=
"../../resources/js-test.js"></script>
3 function test(iframe
) {
4 iframe
.contentWindow
.location
.href
= "resources/does-not-exist.html";
5 testPassed('if no crash');
8 <iframe id=testIframe
onload=
"test(this)"></iframe>
10 description('Detaching a frame in beforeunload event handler should not crash.');
11 var testIframe
= document
.getElementById('testIframe');
12 testIframe
.contentWindow
.onbeforeunload = function(event
) {
13 testIframe
.parentNode
.removeChild(testIframe
);
14 event
.returnValue
= 'beforeunload';