Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / files / file-reader-immediate-abort.html
blob5ff0c4306688cc3bf368752cff2b2005d041d640
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 test1()
14 log("Test that FileReader.abort on newly created FileReader doesn't crash.");
15 new FileReader().abort();
18 function test2()
20 log("Test that FileReader.abort on newly created FileReader doesn't fire events.");
22 var reader = new FileReader();
23 reader.onload = function() {
24 log("Received load event");
26 reader.onloadend = function() {
27 log("Received loadend event");
29 reader.onabort = function() {
30 log("Received abort event");
32 reader.onerror = function(event) {
33 log("Received error event: " + event.target.error.code);
36 reader.abort();
39 function runTests()
41 test1();
42 gc();
43 log("PASSED");
45 test2();
46 gc();
47 log("PASSED");
49 log("DONE");
50 if (testRunner.notifyDone)
51 testRunner.notifyDone();
54 if (window.testRunner) {
55 testRunner.dumpAsText();
56 testRunner.waitUntilDone();
59 window.onload = runTests;
60 </script>
61 </body>
62 </html>