blob: 80e9a018189ae081c5a761cd5481627cfb7afa94 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
pre {
width: 0;
height: 0;
}
img {
position: absolute;
top: 100px;
left: 100px;
}
</style>
<script>
if (!window.testRunner)
document.writeln("To run this test manually, attempt to drag Abe.");
function startTest() {
document.getElementById("abe").addEventListener("dragstart", startDrag, false);
if (!window.testRunner)
return;
testRunner.dumpAsText();
eventSender.mouseMoveTo(110, 110);
eventSender.mouseDown();
eventSender.leapForward(200);
eventSender.mouseMoveTo(0, 0);
eventSender.mouseUp();
document.body.innerHTML = "PASS if no crash."
}
function startDrag(event) {
event.dataTransfer.setData('text/plain', 'Data to Drag');
event.dataTransfer.setDragImage(document.getElementById("pre"), 0, 0);
}
</script>
<body onload="startTest()">
<img id="abe" src="resources/abe.png" draggable="true">
<pre id="pre"></pre>
</body>
</html>