3 <title>Crash doing open on destroyed window
</title>
5 function testCrash1() {
6 var ifr
= document
.createElement('iframe');
7 ifr
.onload = function() {
8 var win
= ifr
.contentWindow
;
9 ifr
.parentNode
.removeChild(ifr
);
10 win
.open('pantz', '_top');
12 document
.body
.appendChild(ifr
);
15 // Test with a deconnected iframe.
16 function testCrash2() {
17 var ifr
= document
.createElement('iframe');
18 ifr
.onload = function() {
19 var win
= ifr
.contentWindow
;
20 ifr
.parentNode
.removeChild(ifr
);
21 win
.open('pantz', ifr
);
23 document
.body
.appendChild(ifr
);
26 // Test with a new iframe.
27 function testCrash3() {
28 var ifr
= document
.createElement('iframe');
29 var ifr2
= document
.createElement('iframe');
30 ifr
.onload = function() {
31 var win
= ifr
.contentWindow
;
32 ifr
.parentNode
.removeChild(ifr
);
33 win
.open('pantz', ifr2
);
35 document
.body
.appendChild(ifr
);
38 function testCrash() {
39 if (window
.testRunner
)
40 testRunner
.dumpAsText();
48 <body onload=
"testCrash()">
49 <p> Bug
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=19588">19588</a>: CRASH doing open() on destroyed window
</p>
50 <p> If this page does not crash the test has passed.
</p>