Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / files / file-reader-done-reading-abort.html
blob3d8fa719c36895d14f45b73f8c8a984b7815859a
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <pre id='console'></pre>
5 <script src="../../resources/gc.js"></script>
6 <script>
7 function log(message)
9 document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
12 function runTest()
14 log("Test that FileReader.abort after reading is done doesn't fire events.");
16 var text = "Hello";
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");
40 reader.abort();
41 gc();
42 finishTest();
45 reader.onerror = function(event) {
46 log("Received error event: " + event.target.error.code);
49 reader.readAsText(new Blob([text]));
52 function finishTest()
54 log("DONE");
55 if (testRunner.notifyDone)
56 testRunner.notifyDone();
59 if (window.testRunner) {
60 testRunner.dumpAsText();
61 testRunner.waitUntilDone();
64 window.onload = runTest;
65 </script>
66 </body>
67 </html>