OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <title>Tests that a degenerate cues without separating blank lines are parsed co
rrectly.</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/tc032-degenerate-cues.vtt", function(trac
k) { |
| 8 var expected = [ |
| 9 { startTime: 0, endTime: 1, text: "" }, |
| 10 { startTime: 2, endTime: 3, text: "" }, |
| 11 { startTime: 4, endTime: 5, text: "" } |
| 12 ]; |
5 | 13 |
6 <script src=../media-file.js></script> | 14 assert_cues_match(track.cues, expected); |
7 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 | 15 }); |
8 (Please avoid writing new tests using video-test.js) --> | 16 </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: 3, | |
28 tests: | |
29 [ | |
30 { | |
31 property: "startTime", | |
32 values: [ "0", "2", "4" ], | |
33 }, | |
34 { | |
35 property: "endTime", | |
36 values: [ "1", "3", "5" ], | |
37 }, | |
38 { | |
39 property: "text", | |
40 values: [ '', '', '' ], | |
41 }, | |
42 ], | |
43 }; | |
44 | |
45 testCues(0, expected); | |
46 | |
47 allTestsEnded(); | |
48 } | |
49 </script> | |
50 </head> | |
51 <body onload="enableAllTextTracks()"> | |
52 <p>Tests that a degenerate cues without separating blank lines are parsed
correctly.</p> | |
53 <video> | |
54 <track src="captions-webvtt/tc032-degenerate-cues.vtt" onload="track
Loaded()"> | |
55 </video> | |
56 </body> | |
57 </html> | |
OLD | NEW |