OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <title>Tests that an empty line after an identifier line discards the current cu
e and restarts the cue loop.</title> |
3 <head> | 3 <script src="track-helpers.js"></script> |
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 4 <script src="../../resources/testharness.js"></script> |
| 5 <script src="../../resources/testharnessreport.js"></script> |
| 6 <script> |
| 7 check_cues_from_track("captions-webvtt/tc030-interspersed-non-cue.vtt", function
(track) { |
| 8 var expected = [ |
| 9 { text: "First" }, |
| 10 { text: "Second" } |
| 11 ]; |
5 | 12 |
6 <script src=../media-file.js></script> | 13 assert_cues_match(track.cues, expected); |
7 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 | 14 }); |
8 (Please avoid writing new tests using video-test.js) --> | 15 </script> |
9 <script src=../video-test.js></script> | |
10 <script> | |
11 | |
12 numberOfTrackTests = 1; | |
13 | |
14 function trackLoaded() | |
15 { | |
16 numberOfTracksLoaded++; | |
17 if (numberOfTracksLoaded == numberOfTrackTests) { | |
18 testTrack0(); | |
19 } | |
20 } | |
21 | |
22 function testTrack0() | |
23 { | |
24 findMediaElement(); | |
25 var expected = | |
26 { | |
27 length: 2, | |
28 tests: | |
29 [ | |
30 { | |
31 property: "text", | |
32 values: | |
33 [ | |
34 'First', | |
35 'Second', | |
36 ], | |
37 }, | |
38 ], | |
39 }; | |
40 testCues(0, expected); | |
41 | |
42 allTestsEnded(); | |
43 } | |
44 </script> | |
45 </head> | |
46 <body onload="enableAllTextTracks()"> | |
47 <p>Tests that an empty line after an identifier line discards the current
cue and restarts the cue loop.</p> | |
48 <video> | |
49 <track src="captions-webvtt/tc030-interspersed-non-cue.vtt" onload="
trackLoaded()"> | |
50 </video> | |
51 </body> | |
52 </html> | |
OLD | NEW |