Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / inserting / insert-paragraph-separator-crash.html
blob033e26addd6406649b757715f1f6001954bbc5bb
1 <!DOCTYPE html>
2 <html>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 function handler() {
8 var element = event.srcElement;
9 document.execCommand('Undo', false, false);
10 element.parentNode.removeChild(element);
11 var em = document.getElementById('em');
12 var span = document.getElementById('span');
13 em.insertBefore(element, span);
14 document.execCommand('JustifyFull', false, false);
16 document.addEventListener("DOMCharacterDataModified", handler, true);
18 window.onload = function() {
19 var selection = window.getSelection();
20 document.execCommand("SelectAll", false, false)
21 var element = document.getElementById("ruby");
22 element.innerHTML = "<em id='em'>^x?x<span id='span'>x&'x";
23 selection.deleteFromDocument();
24 selection.deleteFromDocument();
25 document.designMode = "on";
26 document.execCommand('JustifyRight', false, false);
27 document.execCommand('InsertHorizontalRule', false, '');
28 document.documentElement.innerHTML = "PASS. WebKit didn't crash.";
30 </script>
31 <ruby id="ruby">
32 <a>A</a>
33 </ruby>
34 </html>