OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 <iframe></iframe> |
| 8 <script> |
| 9 description('Should not crash if iframe\'s document element\'s focusout event ha
ndler removes the iframe in the parent document.'); |
| 10 |
| 11 window.jsTestIsAsync = true; |
| 12 |
| 13 function run() |
| 14 { |
| 15 var iframe = document.getElementsByTagName('iframe')[0]; |
| 16 iframe.contentDocument.documentElement.contentEditable = true; |
| 17 iframe.contentDocument.documentElement.addEventListener('focusout', function
() { |
| 18 iframe.parentNode.removeChild(iframe); |
| 19 }, false); |
| 20 iframe.contentDocument.documentElement.focus(); |
| 21 |
| 22 testPassed('Did not crash.'); |
| 23 window.finishJSTest(); |
| 24 } |
| 25 |
| 26 document.addEventListener('DOMContentLoaded', run); |
| 27 </script> |
| 28 </body> |
| 29 </html> |
OLD | NEW |