Bug 1307059 - add elements to the DOM tree so we can dump debugging info when the test times out. draft
authorJW Wang <jwwang@mozilla.com>
Mon, 03 Oct 2016 16:01:27 +0800
changeset 420079 0858d84678194ebfa2dcef609bcbd6c48d5b2984
parent 420078 b1c71f07fe8c8883ac87649de7af43156f1313eb
child 532710 01cae5affd92f2a8c00a7d1b588b675fa55b949f
push id31082
push userjwwang@mozilla.com
push dateMon, 03 Oct 2016 08:02:40 +0000
bugs1307059
milestone52.0a1
Bug 1307059 - add elements to the DOM tree so we can dump debugging info when the test times out. MozReview-Commit-ID: Dgv3vCeMEBX
dom/media/test/test_new_audio.html
--- a/dom/media/test/test_new_audio.html
+++ b/dom/media/test/test_new_audio.html
@@ -26,19 +26,21 @@ var player = new Audio();
 
 function startTest(test, token) {
   if (!player.canPlayType(test.type)) {
     return;
   }
   manager.started(token);
   var a = new Audio(test.name);
   a.autoplay = true;
+  document.body.appendChild(a);
   a.addEventListener("ended",
                      function(e){
                         ok(true, "[" + a.src + "]We should get to the end. Oh look we did.");
+                        a.remove();
                         manager.finished(token);
                      },
                      false);
 }
 
 manager.runTests(gAudioTests, startTest);
 
 </script>