Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / clone-node-load-event-crash.html
blobbcbddb9547452b618e249f0756de7f23b37c7ebb
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script>
5 </script>
6 <div contenteditable='true' id='div'>
7 <script>
8 if (window.testRunner)
9 testRunner.dumpAsText();
11 var div = document.getElementById('div');
12 div.focus();
13 document.body.contentEditable = 'true';
15 function crash() {
16 embed = document.createElement('embed');
17 embed.setAttribute('type', 'text/foo');
18 document.body.appendChild(embed);
19 document.body.cloneNode(true);
22 function removeContent() {
23 document.body.innerHTML = "Tests that we don't crash due to incorrect load event firing during cloneNode. <br />\
24 PASS. WebKit didn't crash.";
27 window.addEventListener('load', removeContent, false);
28 document.addEventListener('DOMContentLoaded', crash, false);
29 </script>
30 </body>
31 </html>