Bug 1332592 - FileReader should dispatch onerror+onloadend when OOM occurs - text fixing, r=me
authorAndrea Marchesini <amarchesini@mozilla.com>
Fri, 20 Jan 2017 15:52:48 +0100
changeset 358380 47486c79362ad09c921c80f40b952eaaeb4aca6a
parent 358379 e4e334566557066f1ed05ebec7031160e1dda49b
child 358381 529ae909938a4759d8ad7b200cf9dab067b5215f
push id10621
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 16:02:43 +0000
treeherdermozilla-aurora@dca7b42e6c67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1332592
milestone53.0a1
Bug 1332592 - FileReader should dispatch onerror+onloadend when OOM occurs - text fixing, r=me
dom/base/test/test_bug1198095.html
--- a/dom/base/test/test_bug1198095.html
+++ b/dom/base/test/test_bug1198095.html
@@ -37,21 +37,16 @@ function onLoadEnd1(e) {
   is(view.length, fileData1.length, "File data length matches");
   for (var i = 0; i < fileData1.length; ++i) {
     is(String.fromCharCode(view[i]), fileData1[i], "Byte matches");
   }
 
   opener.sendAsyncMessage("file.modify", fileData2);
 }
 
-function onLoadEnd2(e) {
-  e.target.removeEventListener('loadend', onLoadEnd2);
-  ok(true, "This method should be called - loadEnd2!");
-}
-
 function onError1(e) {
   ok(false, "This method should not be called - error1!");
 }
 
 function onError2(e) {
   e.target.removeEventListener('error', onError2);
   SimpleTest.finish();
 }
@@ -60,17 +55,16 @@ function onFileOpened(blob) {
   firstBlob = blob;
   r = new FileReader();
   r.addEventListener("loadend", onLoadEnd1);
   r.addEventListener("error", onError1);
   r.readAsArrayBuffer(firstBlob);
 }
 
 function onFileModified(blob) {
-  r.addEventListener("loadend", onLoadEnd2);
   r.removeEventListener('error', onError1);
   r.addEventListener("error", onError2);
   r.readAsArrayBuffer(firstBlob);
 }
 
 SimpleTest.waitForExplicitFinish();
 </script>
 </pre>