Bug 1024535 - Fix for failing video test on Windows 7. r=jwwang, a=test-only
authorMartijn Wargers <mwargers@mozilla.com>
Tue, 12 Aug 2014 16:09:56 -0700
changeset 208339 d2714b6fc28d
parent 208338 3f100f099542
child 208340 da78e23cbe3d
push id3831
push userryanvm@gmail.com
push date2014-08-19 22:04 +0000
treeherdermozilla-beta@7c7145e95cb5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang, test-only
bugs1024535
milestone32.0
Bug 1024535 - Fix for failing video test on Windows 7. r=jwwang, a=test-only
content/media/test/test_load_candidates.html
--- a/content/media/test/test_load_candidates.html
+++ b/content/media/test/test_load_candidates.html
@@ -21,16 +21,19 @@ https://bugzilla.mozilla.org/show_bug.cg
 /** Test for Bug 465458 **/
 
 var manager = new MediaTestManager;
 
 function finish(evt) {
   var v = evt.target;
   is(v._error, 2, "Should have received 2 error events before loaded");
   v._finished = true;
+  // remove error event handler, because this would otherwise
+  // cause a failure on Windows 7, see bug 1024535
+  v.onerror = null;
   v.parentNode.removeChild(v);
   manager.finished(v.token);
 }
 
 function errorHandler(evt) {
   evt.target.parentNode._error++;
 }
 
@@ -40,17 +43,17 @@ var extension = {
   "video/ogg" : "ogv",
   "audio/ogg" : "oga",
   "video/webm" : "webm"
 };
 
 function startTest(test, token) {
   var v = document.createElement('video');
   v.preload = "auto";
-  v.addEventListener("error", function(){ok(false,"Error events on source children should not bubble");}, false);
+  v.onerror = function(){ok(false,"Error events on source children should not bubble");}
   v.token = token;
   manager.started(token);
   v._error = 0;
   v._finished = false;
   v._name = test.name;
 
   var s1 = document.createElement("source");
   s1.type = test.type;