blob: 67970b4d7aa1e9b8f20501b954946779b71ffe8c [file] [log] [blame]
<p>This tests to see if dragging an image is a move drag by default (it should be). You should only see one picture and it should be somewhere near the middle. <b>This demonstrates a bug, the ghost of the drag caret is left after the drop.</b></p>
<div contenteditable="true" id="div">
xxxxxxxxxx<img id="img" src="../resources/abe.png">
</div>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
function runTest() {
if (!window.testRunner)
return;
var img = document.getElementById("img");
var left = img.offsetLeft;
var top = img.offsetTop;
var x = left + img.offsetWidth / 2;
var y = top + img.offsetHeight / 2;
eventSender.mouseMoveTo(x, y);
eventSender.mouseDown();
eventSender.leapForward(1300);
eventSender.mouseMoveTo(left - 28, y);
eventSender.mouseUp();
if (img.complete)
testRunner.notifyDone();
else
img.onload = () => testRunner.notifyDone();
}
window.onload = runTest;
</script>