4 <script src=
"../../resources/js-test.js"></script>
6 if (window
.testRunner
) {
7 testRunner
.dumpAsText();
8 testRunner
.waitUntilDone();
15 dropTarget
= document
.getElementById("drop-target");
16 dropTarget
.addEventListener("drop", function() {
17 dropTarget
.style
.display
= "none";
18 setTimeout(function() {
19 shouldBeEqualToString("dropTarget.value", "C:\\fakepath\\abe.png");
20 if (window
.testRunner
)
21 testRunner
.notifyDone();
25 if (window
.eventSender
) {
26 eventSender
.beginDragWithFiles(["resources/abe.png"]);
27 var x
= dropTarget
.offsetLeft
+ dropTarget
.offsetWidth
/ 2;
28 var y
= dropTarget
.offsetTop
+ dropTarget
.offsetHeight
/ 2;
29 eventSender
.mouseMoveTo(x
, y
);
30 eventSender
.mouseUp();
35 <body onload=
"test()">
36 <input type=
"file" id=
"drop-target">