2 <html class=
"reftest-wait">
6 <video id=
"v1" src=
"black.mp4" width=
"320" height=
"180">
7 <track label=
"English" src=
"cues_time_overlapping.webvtt" default
>
9 <script type=
"text/javascript">
11 * This test is to ensure that when cues with overlapping times, the one with
12 * earlier end timestamp should disappear when the media time reaches its
13 * end time. This vtt file contains two cues, the first cue is [0,1], the second
14 * cue is [0,4], so if we seek video to 2s, only cue2 should be displayed.
16 async
function testTimeOverlappingCues() {
17 const video
= document
.getElementById("v1");
18 video
.currentTime
= 2;
19 video
.onseeked
= () => {
20 video
.onseeked
= null;
21 document
.documentElement
.removeAttribute('class');
25 window
.addEventListener("MozReftestInvalidate",
26 testTimeOverlappingCues
);