Bug 1548446 - part2 : should wait until seek completed. r=jolin
authoralwu <alwu@mozilla.com>
Mon, 13 May 2019 20:49:09 +0000
changeset 532482 770dba43cd13487111289577e0097821d7abb624
parent 532481 42f2738786c9f27eba201a15214b62b05e99fc67
child 532483 e7e7717d923630782861c01221c5fc5048b04c37
push id11268
push usercsabou@mozilla.com
push dateTue, 14 May 2019 15:24:22 +0000
treeherdermozilla-beta@5fb7fcd568d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjolin
bugs1548446
milestone68.0a1
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 1548446 - part2 : should wait until seek completed. r=jolin Main test function should await `seekVideo()` until it finishes. Differential Revision: https://phabricator.services.mozilla.com/D30954
dom/media/test/test_webvtt_seeking.html
--- a/dom/media/test/test_webvtt_seeking.html
+++ b/dom/media/test/test_webvtt_seeking.html
@@ -18,26 +18,26 @@ var CUES_INFO = [
   { id: 1, startTime: 4, endTime: 6, text: "This is cue 1."},
 ];
 
 async function startTest() {
   const video = createVideo();
   const cues = createCues(video);
   await startVideo(video);
 
-  seekVideo(video, cues[0].startTime);
+  await seekVideo(video, cues[0].startTime);
   await waitUntilCueIsShowing(cues[0]);
   checkActiveCueAndInactiveCue(cues[0], cues[1]);
 
-  seekVideo(video, cues[1].startTime);
+  await seekVideo(video, cues[1].startTime);
   await waitUntilCueIsShowing(cues[1]);
   checkActiveCueAndInactiveCue(cues[1], cues[0]);
 
   // seek forward again
-  seekVideo(video, cues[0].startTime);
+  await seekVideo(video, cues[0].startTime);
   await waitUntilCueIsShowing(cues[0]);
   checkActiveCueAndInactiveCue(cues[0], cues[1]);
 
   removeNodeAndSource(video);
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();