Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / crash-on-drag-with-mutation-events.html
blobd41147fbdec2fd30520c899a3ff8fa58ded9bf07
1 <body style="margin: 0px">
2 <div>Make sure WebKit doesn't crash when web authors blast away everything in DOMNodeInserted handler! https://bugs.webkit.org/show_bug.cgi?id=22634</div>
3 <div id="dragstart" contentEditable>Drag something from here to the document below</div>
4 <iframe src="about:blank" id="iframe"></iframe>
5 <script>
6 var iframe = document.getElementById("iframe");
7 iframe.style.height = "20px";
8 var doc = iframe.contentDocument;
9 doc.body.style.margin = "0px";
10 var divForDrop = document.createElement("div");
11 divForDrop.contentEditable = true;
12 doc.body.appendChild(divForDrop);
13 divForDrop.appendChild(document.createTextNode("Drop on this line!"));
15 function clearDivDuringInsertion()
17 doc.execCommand("selectall");
18 doc.execCommand("delete");
19 doc.execCommand("selectall");
22 divForDrop.addEventListener("DOMNodeInserted", clearDivDuringInsertion, true);
24 if (window.eventSender) {
25 testRunner.dumpAsText();
27 var startDiv = document.getElementById("dragstart");
28 startDiv.focus();
29 document.execCommand("selectall");
31 var startX = startDiv.offsetLeft + 10;
32 var startY = startDiv.offsetTop + 10;
34 var endX = iframe.offsetLeft + divForDrop.offsetLeft + 10;
35 var endY = iframe.offsetTop + divForDrop.offsetTop + 10;
37 eventSender.mouseMoveTo(startX, startY);
38 eventSender.mouseDown();
39 eventSender.leapForward(1000);
41 eventSender.mouseMoveTo(endX, endY);
42 eventSender.mouseUp();
44 document.body.innerHTML = "PASSED, no crash";
47 </script>