OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <body> | 2 <body> |
3 <script src="../js/resources/js-test-pre.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 <script> | 4 <script> |
5 description('Ensure that removing an iframe from the tree results in frame destr
uction'); | 5 description('Ensure that removing an iframe from the tree results in frame destr
uction'); |
6 | 6 |
7 var frame = document.createElement('iframe'); | 7 var frame = document.createElement('iframe'); |
8 function handler() { | 8 function handler() { |
9 var p = frame.parentNode; | 9 var p = frame.parentNode; |
10 p.removeChild(frame); | 10 p.removeChild(frame); |
11 p.appendChild(frame); | 11 p.appendChild(frame); |
12 } | 12 } |
13 | 13 |
14 document.body.appendChild(frame); | 14 document.body.appendChild(frame); |
15 frame.contentWindow.onunload = handler; | 15 frame.contentWindow.onunload = handler; |
16 frame.parentNode.removeChild(frame) | 16 frame.parentNode.removeChild(frame) |
17 shouldBeNull("frame.contentWindow"); | 17 shouldBeNull("frame.contentWindow"); |
18 | 18 |
19 var div = document.body.appendChild(document.createElement('div')); | 19 var div = document.body.appendChild(document.createElement('div')); |
20 div.appendChild(frame); | 20 div.appendChild(frame); |
21 div.removeChild(frame); | 21 div.removeChild(frame); |
22 shouldBeNull("frame.contentWindow"); | 22 shouldBeNull("frame.contentWindow"); |
23 debug('Did not crash'); | 23 debug('Did not crash'); |
24 </script> | 24 </script> |
25 </body> | 25 </body> |
OLD | NEW |