blob: 67f342ef554f5b40e35e2cbee5e4a7d478cef348 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#start, #end {
display: inline-block;
}
</style>
<script>
function runTest()
{
if (window.testRunner) {
testRunner.dumpAsText();
}
var start = document.getElementById('start');
var end = document.getElementById('end');
getSelection().setBaseAndExtent(start, 0, start, 1);
if (window.eventSender) {
eventSender.dragMode = false;
eventSender.mouseMoveTo(start.offsetLeft + start.offsetWidth / 2, start.offsetTop + start.offsetHeight / 2);
eventSender.mouseDown();
eventSender.leapForward(2000);
eventSender.mouseMoveTo(end.offsetLeft + end.offsetWidth / 2, end.offsetTop + end.offsetHeight / 2);
eventSender.mouseUp();
}
}
window.addEventListener('load', runTest);
</script>
</head>
<body contenteditable="true">
<p id="start">Drag Me</p>
<p id="end">Drop Here</p>
</body>
</html>