| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Test that cues are rendered and removed.</title> | 2 <title>Test that cues are rendered and removed.</title> |
| 3 <script src="../media-file.js"></script> | 3 <script src="../media-file.js"></script> |
| 4 <script src="../media-controls.js"></script> | 4 <script src="../media-controls.js"></script> |
| 5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
| 6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
| 7 <video> | 7 <video> |
| 8 <track src="captions-webvtt/captions-gaps.vtt" kind="captions" default> | 8 <track src="captions-webvtt/captions-gaps.vtt" kind="captions" default> |
| 9 </video> | 9 </video> |
| 10 <script> | 10 <script> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 video.onseeked = t.step_func(function() { | 28 video.onseeked = t.step_func(function() { |
| 29 var time = info[seekTimeIndex]; | 29 var time = info[seekTimeIndex]; |
| 30 assert_equals(video.currentTime, time); | 30 assert_equals(video.currentTime, time); |
| 31 var cueText = info[++seekTimeIndex]; | 31 var cueText = info[++seekTimeIndex]; |
| 32 ++seekTimeIndex; | 32 ++seekTimeIndex; |
| 33 | 33 |
| 34 assert_equals(video.currentTime.toFixed(1), time.toFixed(1)); | 34 assert_equals(video.currentTime.toFixed(1), time.toFixed(1)); |
| 35 if (cueText.length) { | 35 if (cueText.length) { |
| 36 assert_equals(testTrack.track.activeCues[0].text, cueText); | 36 assert_equals(testTrack.track.activeCues[0].text, cueText); |
| 37 assert_equals(textTrackDisplayElement(video, "display").innerText, c
ueText); | 37 assert_equals(textTrackDisplayElement(video).innerText, cueText); |
| 38 } else { | 38 } else { |
| 39 assert_equals(testTrack.track.activeCues.length, 0); | 39 assert_equals(testTrack.track.activeCues.length, 0); |
| 40 } | 40 } |
| 41 | 41 |
| 42 if (seekTimeIndex >= info.length) | 42 if (seekTimeIndex >= info.length) |
| 43 t.done(); | 43 t.done(); |
| 44 | 44 |
| 45 video.currentTime = info[seekTimeIndex]; | 45 video.currentTime = info[seekTimeIndex]; |
| 46 }); | 46 }); |
| 47 | 47 |
| 48 video.currentTime = info[0]; | 48 video.currentTime = info[0]; |
| 49 }); | 49 }); |
| 50 </script> | 50 </script> |
| OLD | NEW |