blob: ff460c339a08fea60e502f360a5ed05ece2f10a2 [file] [log] [blame]
Test that cues are rendered and removed.
EVENT(canplaythrough)
EVENT(seeked)
EXPECTED (video.currentTime.toFixed(1) == '0.5') OK
No text track cue with display id '-webkit-media-text-track-display' is currently visible
RUN(video.currentTime = 1.5)
EVENT(seeked)
EXPECTED (video.currentTime.toFixed(1) == '1.5') OK
EXPECTED (testTrack.track.activeCues[0].text == 'Lorem ipsum dolor sit amet,') OK
EXPECTED (textTrackDisplayElement(video, 'display').innerText == 'Lorem ipsum dolor sit amet,') OK
RUN(video.currentTime = 2.5)
EVENT(seeked)
EXPECTED (video.currentTime.toFixed(1) == '2.5') OK
No text track cue with display id '-webkit-media-text-track-display' is currently visible
RUN(video.currentTime = 3.3)
EVENT(seeked)
EXPECTED (video.currentTime.toFixed(1) == '3.3') OK
EXPECTED (testTrack.track.activeCues[0].text == 'consectetuer adipiscing elit,') OK
EXPECTED (textTrackDisplayElement(video, 'display').innerText == 'consectetuer adipiscing elit,') OK
RUN(video.currentTime = 0.6)
EVENT(seeked)
EXPECTED (video.currentTime.toFixed(1) == '0.6') OK
No text track cue with display id '-webkit-media-text-track-display' is currently visible
RUN(video.currentTime = 5.9)
EVENT(seeked)
EXPECTED (video.currentTime.toFixed(1) == '5.9') OK
EXPECTED (testTrack.track.activeCues[0].text == 'sed diam nonummy nibh euismod tincidunt') OK
EXPECTED (textTrackDisplayElement(video, 'display').innerText == 'sed diam nonummy nibh euismod tincidunt') OK
RUN(video.currentTime = 4.4)
EVENT(seeked)
EXPECTED (video.currentTime.toFixed(1) == '4.4') OK
No text track cue with display id '-webkit-media-text-track-display' is currently visible
RUN(video.currentTime = 7.9)
EVENT(seeked)
EXPECTED (video.currentTime.toFixed(1) == '7.9') OK
EXPECTED (testTrack.track.activeCues[0].text == 'ut laoreet dolore magna aliquam erat volutpat.') OK
EXPECTED (textTrackDisplayElement(video, 'display').innerText == 'ut laoreet dolore magna aliquam erat volutpat.') OK
END OF TEST