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 375356 47486c79362ad09c921c80f40b952eaaeb4aca6a
parent 375355 e4e334566557066f1ed05ebec7031160e1dda49b
child 375357 529ae909938a4759d8ad7b200cf9dab067b5215f
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1332592
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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>