blob: 216dcce47f0bb04b036a37536145fb7167d3bbe5 [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();
}
function startDrag(event) {
event.dataTransfer.setData('text/plain', 'Data to Drag');
try {
event.dataTransfer.setDragImage(null, 0, 0);
document.body.innerHTML = "FAIL";
} catch (e) {
document.body.innerHTML = "PASS";
}
}
</script>
<body onload="startTest()">
<img id="abe" src="resources/abe.png" draggable="true">
<pre id="pre"></pre>
</body>
</html>