Bug 1295923 - remove the workaround since bug 1329403 is fixed and 'onload' won't be fired prematurely before the media element finishes loading. draft
authorJW Wang <jwwang@mozilla.com>
Fri, 20 Jan 2017 11:52:52 +0800
changeset 463991 bc7427741302d1bd56fc09af2df8966d7215c3d4
parent 463986 d441967fa08f0a27292d0f77b3d3dcbf45b801e0
child 542834 21d5e7010c77bd87f06c46e17692113f9364e9c4
push id42248
push userjwwang@mozilla.com
push dateFri, 20 Jan 2017 06:03:37 +0000
bugs1295923, 1329403
milestone53.0a1
Bug 1295923 - remove the workaround since bug 1329403 is fixed and 'onload' won't be fired prematurely before the media element finishes loading. MozReview-Commit-ID: beXOjulT1E
dom/media/test/test_error_in_video_document.html
--- a/dom/media/test/test_error_in_video_document.html
+++ b/dom/media/test/test_error_in_video_document.html
@@ -44,25 +44,16 @@ function check() {
 var t = getPlayableVideo(gErrorTests);
 if (!t) {
   todo(false, "No types supported");
 } else {
   SimpleTest.waitForExplicitFinish();
 
   var f = document.createElement("iframe");
   f.src = t.name;
-  f.addEventListener("load", function() {
-    if (documentVideo().error) {
-      info("Error occured by the time we got |load| - checking directly.");
-      check();
-    } else {
-      //TODO: Fix this todo in Bug 1295923.
-      todo(false, "Error hasn't occurred yet - adding |error| event listener. This shouldn't happen, see bug 608634.");
-      documentVideo().addEventListener("error", check);
-    }
-  });
+  f.addEventListener("load", check);
   document.body.appendChild(f);
 }
 
 </script>
 </pre>
 </body>
 </html>