blob: 1acdad7ba379b31cf195e69e099d5168f852186f [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var dropTarget;
function test()
{
dropTarget = document.getElementById("drop-target");
dropTarget.addEventListener("drop", function() {
dropTarget.style.display = "none";
setTimeout(function() {
shouldBeEqualToString("dropTarget.value", "C:\\fakepath\\abe.png");
if (window.testRunner)
testRunner.notifyDone();
}, 0);
}, false);
if (window.eventSender) {
eventSender.beginDragWithFiles(["resources/abe.png"]);
var x = dropTarget.offsetLeft + dropTarget.offsetWidth / 2;
var y = dropTarget.offsetTop + dropTarget.offsetHeight / 2;
eventSender.mouseMoveTo(x, y);
eventSender.mouseUp();
}
}
</script>
</head>
<body onload="test()">
<input type="file" id="drop-target">
</body>
</html>