From f0a398cc59801a5ec89aee391792210f4df4fa06 Mon Sep 17 00:00:00 2001 From: alwu Date: Mon, 13 May 2019 20:49:09 +0000 Subject: [PATCH] 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 --HG-- extra : moz-landing-system : lando --- dom/media/test/test_webvtt_seeking.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dom/media/test/test_webvtt_seeking.html b/dom/media/test/test_webvtt_seeking.html index 48ddf364656a..1f859697439d 100644 --- a/dom/media/test/test_webvtt_seeking.html +++ b/dom/media/test/test_webvtt_seeking.html @@ -23,16 +23,16 @@ async function startTest() { 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]);