1<!DOCTYPE html> 2<html> 3 <head> 4 <meta charset="utf-8"> 5 <title>FileAPI Test: filereader_error</title> 6 <link rel="author" title="Intel" href="http://www.intel.com"> 7 <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#dfn-domerror"> 8 <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#abort"> 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 </head> 12 <body> 13 <div id="log"></div> 14 15 <script> 16 async_test(function() { 17 var blob = new Blob(["TEST THE ERROR ATTRIBUTE AND ERROR EVENT"]); 18 var reader = new FileReader(); 19 assert_equals(reader.error, null, "The error is null when no error occurred"); 20 21 reader.onload = this.step_func(function(evt) { 22 assert_unreached("Should not dispatch the load event"); 23 }); 24 25 reader.onloadend = this.step_func(function(evt) { 26 assert_equals(reader.result, null, "The result is null"); 27 this.done(); 28 }); 29 30 reader.readAsText(blob); 31 reader.abort(); 32 }); 33 </script> 34 </body> 35</html> 36