Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / inserting / delete-insignificant-text-crash.html
blob2cd6ee3ada162abd560ce9455d713b2997481918
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>This tests deleting a node in DOMCharacterDataModified doesn't result in a crash.</p>
5 <div id="test" contenteditable></div>
6 <script>
8 if (window.testRunner)
9 testRunner.dumpAsText();
11 var test = document.getElementById('test');
12 test.appendChild(document.createTextNode('a '));
13 test.appendChild(document.createTextNode(' '));
14 test.appendChild(document.createTextNode('b'));
15 test.appendChild(document.createTextNode(' '));
16 getSelection().collapse(test.firstChild.nextSibling, 0);
17 document.body.addEventListener('DOMCharacterDataModified', function () {
18 test.removeChild(test.firstChild.nextSibling);
19 if (window.GCController)
20 GCController.collect();
21 }, false);
22 document.execCommand("InsertText", false, "c");
24 test.textContent = '';
25 document.writeln('PASS');
27 </script>
28 </body>
29 </html>