Bug 1312618 - Intermittent dom/base/test/test_noAudioNotificationOnVolume0Element.html. draft
authorAlastor Wu <alwu@mozilla.com>
Fri, 16 Dec 2016 18:48:39 +0800
changeset 450344 da0661ed00bccb9574c3c908377f33197b11268f
parent 449758 b1ab720c6d3e412ede797b08dfe63dca170f6ee0
child 539734 dd9b06af38fd42cf8b3a89a5ca7bdfa4cddbce62
push id38838
push useralwu@mozilla.com
push dateFri, 16 Dec 2016 10:53:04 +0000
bugs1312618
milestone53.0a1
Bug 1312618 - Intermittent dom/base/test/test_noAudioNotificationOnVolume0Element.html. MozReview-Commit-ID: 6s3a1alEIUw
dom/base/test/test_noAudioNotificationOnMutedElement.html
dom/base/test/test_noAudioNotificationOnMutedOrVolume0Element.html
--- a/dom/base/test/test_noAudioNotificationOnMutedElement.html
+++ b/dom/base/test/test_noAudioNotificationOnMutedElement.html
@@ -34,18 +34,17 @@ var audio = new Audio();
 audio.loop = true;
 
 var tests = [
   function() {
     observerService.addObserver(observer, "audio-playback", false);
     ok(true, "Observer set");
 
     audio.src = "audio.ogg";
-    // Wait for the audio metadata to become available so that we have an audio track.
-    audio.onloadedmetadata = runTest;
+    runTest();
   },
 
   // Verify that muting and unmuting dispatches the events as expected.
   function() {
     expectedNotification = 'active';
     audio.play();
   },
 
--- a/dom/base/test/test_noAudioNotificationOnMutedOrVolume0Element.html
+++ b/dom/base/test/test_noAudioNotificationOnMutedOrVolume0Element.html
@@ -34,18 +34,17 @@ var audio = new Audio();
 audio.loop = true;
 
 var tests = [
   function() {
     observerService.addObserver(observer, "audio-playback", false);
     ok(true, "Observer set");
 
     audio.src = "audio.ogg";
-    // Wait for the audio metadata to become available so that we have an audio track.
-    audio.onloadedmetadata = runTest;
+    runTest();
   },
 
   // Verify that unmuting when the volume is 0 doesn't dispatch the events.
   function() {
     expectedNotification = 'active';
     audio.play();
   },