Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / frames / reattach-in-unload.html
blob151ef1968725811adea449806ba208758356dc4c
1 <!DOCTYPE html>
2 <body>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 description('Ensure that removing an iframe from the tree results in frame destruction');
7 var frame = document.createElement('iframe');
8 function handler() {
9 var p = frame.parentNode;
10 p.removeChild(frame);
11 p.appendChild(frame);
14 document.body.appendChild(frame);
15 frame.contentWindow.onunload = handler;
16 frame.parentNode.removeChild(frame)
17 shouldBeNull("frame.contentWindow");
19 var div = document.body.appendChild(document.createElement('div'));
20 div.appendChild(frame);
21 div.removeChild(frame);
22 shouldBeNull("frame.contentWindow");
23 debug('Did not crash');
24 </script>
25 </body>