filereader_error.any.js (614B)
1 // META: title=FileAPI Test: filereader_error 2 3 async_test(function() { 4 var blob = new Blob(["TEST THE ERROR ATTRIBUTE AND ERROR EVENT"]); 5 var reader = new FileReader(); 6 assert_equals(reader.error, null, "The error is null when no error occurred"); 7 8 reader.onload = this.step_func(function(evt) { 9 assert_unreached("Should not dispatch the load event"); 10 }); 11 12 reader.onloadend = this.step_func(function(evt) { 13 assert_equals(reader.result, null, "The result is null"); 14 this.done(); 15 }); 16 17 reader.readAsText(blob); 18 reader.abort(); 19 });