5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
12 var dropTarget = document.getElementById("drop-target");
13 dropTarget.addEventListener("dragleave", function() {
14 dropTarget.style.display = "none";
17 if (window.eventSender) {
18 eventSender.beginDragWithFiles(["resources/abe.png"]);
19 var x = dropTarget.offsetLeft + dropTarget.offsetWidth / 2;
20 var y = dropTarget.offsetTop + dropTarget.offsetHeight / 2;
21 eventSender.mouseMoveTo(x, y);
22 eventSender.mouseMoveTo(0, 0);
24 // The test harness wants us to call eventSender.mouseUp() before finishing,
25 // but we need to not navigate when that happens, so add a drop handler that
26 // prevents navigation.
27 window.addEventListener("drop", function() {
28 event.preventDefault();
30 eventSender.mouseUp();
33 if (window.testRunner)
34 testRunner.notifyDone();
38 <body onload="test()">
39 <p>This test passes if there is no crash when dragging a file over and then away from the file input element below.</p>
40 <input type="file" id="drop-target">