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
This commit is contained in:
alwu 2019-05-13 20:49:09 +00:00
Родитель e87aa05c40
Коммит f0a398cc59
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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]);