OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 5 |
| 6 <script src=../media-file.js></script> |
| 7 <script src=../video-test.js></script> |
| 8 <script> |
| 9 |
| 10 numberOfTrackTests = 3; |
| 11 |
| 12 function trackLoaded() |
| 13 { |
| 14 numberOfTracksLoaded++; |
| 15 if (numberOfTracksLoaded == numberOfTrackTests) { |
| 16 testTrack(0); |
| 17 testTrack(1); |
| 18 testTrack(2); |
| 19 } |
| 20 } |
| 21 |
| 22 function testTrack(i) |
| 23 { |
| 24 findMediaElement(); |
| 25 var expected = |
| 26 { |
| 27 length: 2, |
| 28 tests: |
| 29 [ |
| 30 { |
| 31 property: "startTime", |
| 32 values: [ "0", "2" ], |
| 33 }, |
| 34 { |
| 35 property: "endTime", |
| 36 values: [ "1", "3" ], |
| 37 }, |
| 38 { |
| 39 property: "text", |
| 40 values: |
| 41 [ |
| 42 'Valid cue 1', |
| 43 'Valid cue 2', |
| 44 ], |
| 45 }, |
| 46 ], |
| 47 }; |
| 48 |
| 49 testCues(i, expected); |
| 50 |
| 51 allTestsEnded(); |
| 52 } |
| 53 </script> |
| 54 </head> |
| 55 <body onload="enableAllTextTracks()"> |
| 56 <p>Tests that a cue is recovered when a line with a "-->" is encountered (
missing blank line separator).</p> |
| 57 <video> |
| 58 <track src="captions-webvtt/tc031-cue-recovery-header.vtt" onload="t
rackLoaded()"> |
| 59 <track src="captions-webvtt/tc031-cue-recovery-note.vtt" onload="tra
ckLoaded()"> |
| 60 <track src="captions-webvtt/tc031-cue-recovery-cuetext.vtt" onload="
trackLoaded()"> |
| 61 </video> |
| 62 </body> |
| 63 </html> |
OLD | NEW |