blob: f4654afa1236cdaa0e87211fde88513c055411a5 [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>
function runTest() {
if (!window.layoutTestController)
return;
window.layoutTestController.waitUntilDone();
window.setTimeout(step2, 200);
}
function step2() {
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();
window.layoutTestController.notifyDone();
}
runTest();
</script>