Chromium Code Reviews| 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 DOMFocusOut event handler 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('DOMFocusOut', funct ion () { | |
|
yosin_UTC9
2014/04/14 02:00:27
nit: Can we use "focusout" instead of "DOMFocusOut
Yuta Kitamura
2014/04/14 02:44:32
Done.
| |
| 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 |