4 <input type=file id=file onchange='onInputFileChange()'
>
5 <p id=status
>To test manually, drag a directory to the file input above.
</p>
7 var input
= document
.getElementsByTagName("input")[0];
8 var statusElement
= document
.getElementById("status");
10 function onInputFileChange()
12 var file
= document
.getElementById('file').files
[0];
13 var reader
= new FileReader();
14 statusElement
.textContent
= "Starting test...";
15 reader
.readAsText(file
);
16 reader
.onloadend = function() {
17 statusElement
.textContent
= "PASS, no crash";
18 if (window
.testRunner
)
19 testRunner
.notifyDone();
23 if (window
.testRunner
) {
24 testRunner
.dumpAsText();
25 testRunner
.waitUntilDone();
28 eventSender
.beginDragWithFiles(['resources']);
29 eventSender
.mouseMoveTo(input
.offsetLeft
+ 1, input
.offsetTop
+ 1);
30 eventSender
.mouseUp();