Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / content-changed-during-drop.html
blobd262f80c0667aef3284585325123ccdf473bdedb
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script>
6 function resetField()
7 {
8 event.target.value = '';
11 function runTest()
13 if (window.testRunner) {
14 testRunner.dumpAsText();
16 elementToDrag = document.getElementById("elementToDrag");
17 x1 = elementToDrag.offsetLeft + elementToDrag.offsetWidth / 2;
18 y1 = elementToDrag.offsetTop + elementToDrag.offsetHeight / 2;
20 dragTarget = document.getElementById("dragTarget");
21 x2 = dragTarget.offsetLeft + dragTarget.offsetWidth / 2;
22 y2 = dragTarget.offsetTop + dragTarget.offsetHeight / 2;
24 eventSender.mouseMoveTo(x1,y1);
25 eventSender.mouseDown();
26 eventSender.leapForward(400);
27 eventSender.mouseMoveTo(x2, y2);
28 eventSender.mouseUp();
29 shouldBe("dragTarget.value", "elementToDrag.href");
30 testPassed("Didn't crash.");
31 //clean up output
32 elementToDrag.parentNode.removeChild(elementToDrag);
33 dragTarget.parentNode.removeChild(dragTarget);
34 } else {
35 debug('<br>To test this manually drag the link into the text field.')
38 </script>
39 </head>
40 <body>
41 <p id="description"></p>
42 <a id="elementToDrag" href="http://example.com">A link!</a>
43 <input id="dragTarget" type="text" value="Original Text" onfocus="resetField()" />
44 <div id="console"></div>
45 <script>
46 description("This tests that we don't lose data dropped onto an input field that changes its content during a drop event");
47 runTest();
48 </script>
49 </body>
50 </html>