OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> |
| 5 <script> |
| 6 description("Indirectly detaching frames on load completion should not crash."); |
| 7 |
| 8 window.jsTestIsAsync = true; |
| 9 |
| 10 function maybeStart() |
| 11 { |
| 12 window.secondFrame.contentWindow.onunload = function() { |
| 13 document.documentElement.removeChild(window.bodyEl); |
| 14 setTimeout(finishJSTest, 10); |
| 15 }; |
| 16 window.firstFrame.src = 'about:blank'; |
| 17 } |
| 18 function runTest() |
| 19 { |
| 20 window.firstFrame = document.createElement('iframe'); |
| 21 document.body.appendChild(window.firstFrame); |
| 22 window.secondFrame = document.createElement('iframe'); |
| 23 window.secondFrame.src = 'javascript:window.top.maybeStart();'; |
| 24 window.firstFrame.contentDocument.documentElement.appendChild(window.secondF
rame); |
| 25 } |
| 26 |
| 27 window.onload = runTest; |
| 28 </script> |
| 29 </head> |
| 30 <body id=bodyEl> |
| 31 </html> |
OLD | NEW |