Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / files / file-reader-readystate.html
blob931af653cafed21cbb6e6de8d9e823353fac0102
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>FileReader readyState</title>
5 <link rel="help" href="http://www.w3.org/TR/FileAPI/#events">
6 <script src="../../resources/testharness.js"></script>
7 <script src="../../resources/testharnessreport.js"></script>
8 </head>
9 <body>
10 <script>
12 var reader = new FileReader();
14 setup({explicit_done: true});
16 test(function() {
17 assert_equals(reader.readyState, reader.EMPTY, "The readyState");
18 }, "Check if the readyState is EMPTY initially");
20 on_event(reader, "loadstart", function() {
21 test(function() {
22 assert_equals(reader.readyState, reader.LOADING, "The readyState");
23 }, "Check if the readyState is LOADING in loadstart");
24 });
26 on_event(reader, "progress", function() {
27 test(function() {
28 assert_equals(reader.readyState, reader.LOADING, "The readyState");
29 }, "Check if the readyState is LOADING in progress");
30 });
32 on_event(reader, "load", function() {
33 test(function() {
34 assert_equals(reader.readyState, reader.DONE, "The readyState");
35 }, "Check if the readyState is DONE in load");
36 });
38 on_event(reader, "loadend", function() {
39 test(function() {
40 assert_equals(reader.readyState, reader.DONE, "The readyState");
41 }, "Check if the readyState is DONE in loadend");
43 done();
44 });
46 reader.readAsText(new Blob(["foo"]));
48 </script>
49 </body>
50 </html>