Bug 593074 - Prevent multiple test finish from causing errors. a=test-fix
authorChris Pearce <chris@pearce.org.nz>
Fri, 03 Sep 2010 12:03:03 +1200
changeset 51942 0077f00651bf98c1ea34ec646d667c97fd6cacc3
parent 51941 ae8514aab30d62cdd7925b692c8dc101faa88b84
child 51943 58d179ea65f022b2670e4cf94dd7793bf9c99877
push idunknown
push userunknown
push dateunknown
reviewerstest-fix
bugs593074
milestone2.0b6pre
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 593074 - Prevent multiple test finish from causing errors. a=test-fix
content/media/test/test_preload_actions.html
--- a/content/media/test/test_preload_actions.html
+++ b/content/media/test/test_preload_actions.html
@@ -41,17 +41,19 @@ addLoadEvent(function() {gotLoadEvent=tr
 
 function log(m) {
   var l = document.getElementById("log");
   l.innerHTML += m;
 }
 
 function maybeFinish(v, n) {
   log(n + ",");
-  v.parentNode.removeChild(v);
+  if (v.parentNode) {
+    v.parentNode.removeChild(v);
+  }
   manager.finished(v.token);
 }
 
 function filename(uri) {
   return uri.substr(uri.lastIndexOf("/")+1);
 }
 
 // Every test must have a setup(v) function, and must set _finished field on target v to