Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / crash-on-mutate-during-drop.html
blobe5e2b87681aa572101a55f2910add71ce7ea49a7
1 <html>
2 <head>
3 <script>
4 function foo() {
5 if (event.type == "DOMNodeInserted" && event.target.nodeType == 3)
6 document.body.innerHTML = "PASSED";
9 function runTest() {
10 if (!window.testRunner)
11 return;
13 window.testRunner.dumpAsText();
15 document.addEventListener("DOMNodeInserted", function() { foo() }, true);
17 // Select the element 'dragSource'.
18 var selection = window.getSelection();
19 var range = document.createRange();
20 range.selectNode(document.getElementById("dragSource"));
21 selection.addRange(range);
23 // Drag the source text to the target text.
24 var source = document.getElementById('dragSource');
25 var target = document.getElementById('dragTarget');
26 eventSender.mouseMoveTo(source.offsetLeft + 2, source.offsetTop + 2);
27 eventSender.mouseDown();
28 eventSender.leapForward(500);
29 eventSender.mouseMoveTo(target.offsetLeft + target.offsetWidth / 2,
30 target.offsetTop + target.offsetHeight / 2);
31 eventSender.mouseUp();
33 </script>
34 </head>
35 <body contenteditable="true" onload="runTest()">
36 <p>This test tests for a crash when a DOM mutation event listener
37 modifies the text during a drop. If the test doesn't crash, all is good.
38 <p id="dragSource">drag source text
39 <p id="dragTarget">drag dest text
40 </body>
41 </html>