4 <input type=
"file" name=
"file" id=
"file" onchange=
"onInputFileChange()">
5 <pre id='console'
></pre>
10 document
.getElementById('console').appendChild(document
.createTextNode(message
+ "\n"));
13 function onInputFileChange()
15 log("Test that FileReader.abort works.");
17 var file
= document
.getElementById("file").files
[0];
18 var reader
= new FileReader();
19 reader
.readAsText(file
);
20 reader
.onloadstart = function() {
21 log("Received loadstart event");
24 reader
.onload = function() {
25 log("Received load event");
27 reader
.onloadend = function() {
28 log("Received loadend event");
30 if (testRunner
.notifyDone
)
31 testRunner
.notifyDone();
33 reader
.onabort = function() {
34 log("Received abort event");
36 reader
.onerror = function(event
) {
37 log("Received error event: " + event
.target
.error
.name
);
43 eventSender
.beginDragWithFiles(['resources/UTF8.txt']);
44 eventSender
.mouseMoveTo(10, 10);
45 eventSender
.mouseUp();
48 if (window
.eventSender
) {
49 testRunner
.dumpAsText();
50 testRunner
.waitUntilDone();
51 window
.onload
= runTests
;