4 <pre id='console'
></pre>
5 <script src=
"../../resources/gc.js"></script>
9 document
.getElementById('console').appendChild(document
.createTextNode(message
+ "\n"));
14 log("Test that FileReader.abort after reading is done doesn't fire events.");
17 var reader
= new FileReader();
19 reader
.onloadend = function(event
) {
20 fileString
= event
.target
.result
;
21 if (fileString
!= text
)
22 log("Incorrect data read, expected " + text
+ ", got " + fileString
);
24 reader
.onabort = function() {
25 log("Received abort event after reading");
27 reader
.onload = function() {
28 log("Received load event after reading");
30 reader
.onloadend = function() {
31 log("Received loadend event after reading");
33 reader
.onloadstart = function() {
34 log("Received load start event after reading");
36 reader
.onprogress = function() {
37 log("Received progress event after reading");
45 reader
.onerror = function(event
) {
46 log("Received error event: " + event
.target
.error
.code
);
49 reader
.readAsText(new Blob([text
]));
55 if (testRunner
.notifyDone
)
56 testRunner
.notifyDone();
59 if (window
.testRunner
) {
60 testRunner
.dumpAsText();
61 testRunner
.waitUntilDone();
64 window
.onload
= runTest
;