Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / files / file-reader-abort.html
blobcefca711340b1e249dd87d8c1b91336aaa00268b
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <input type="file" name="file" id="file" onchange="onInputFileChange()">
5 <pre id='console'></pre>
7 <script>
8 function log(message)
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");
22 reader.abort();
24 reader.onload = function() {
25 log("Received load event");
27 reader.onloadend = function() {
28 log("Received loadend event");
29 log("DONE");
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);
41 function runTests()
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;
53 </script>
54 </body>
55 </html>