5 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=70277">bug 70277</a>.
6 This tests that a link is dragged and dropped properly in an already focused editable area.
7 This test passes only if it does not hit an assertion.
9 <a href=# id="anchorElement">Test Link</a>
11 <div id="editableDiv" contenteditable="true">
12 <h3>Editable area</h3>
19 function dragElement(srcElement, destElement)
21 eventSender.mouseMoveTo(srcElement.offsetLeft + srcElement.offsetWidth / 2,
22 srcElement.offsetTop + srcElement.offsetHeight / 2);
23 eventSender.mouseDown();
24 eventSender.leapForward(100);
25 eventSender.mouseMoveTo(destElement.offsetLeft + destElement.offsetWidth / 2,
26 destElement.offsetTop + destElement.offsetHeight / 2);
27 eventSender.mouseUp();
29 document.getElementById('result').innerHTML = "PASS";
32 if (window.testRunner)
33 testRunner.dumpAsText();
35 var editableDiv = document.getElementById('editableDiv');
37 dragElement(document.getElementById('anchorElement'), editableDiv);