3 <script src="../js/resources/js-test-pre.js"></script>
8 event.target.value = '';
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.");
32 elementToDrag.parentNode.removeChild(elementToDrag);
33 dragTarget.parentNode.removeChild(dragTarget);
35 debug('<br>To test this manually drag the link into the text field.')
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>
46 description("This tests that we don't lose data dropped onto an input field that changes its content during a drop event");
49 <script src="../js/resources/js-test-post.js"></script>