OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
5 | 5 |
6 <script src=../media-file.js></script> | 6 <script src=../media-file.js></script> |
| 7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 8 (Please avoid writing new tests using video-test.js) --> |
7 <script src=../video-test.js></script> | 9 <script src=../video-test.js></script> |
8 <script> | 10 <script> |
9 | 11 |
10 function loaded() | 12 function loaded() |
11 { | 13 { |
12 track = document.getElementsByTagName("track")[0]; | 14 track = document.getElementsByTagName("track")[0]; |
13 testExpected("track.track.cues.length", 1); | 15 testExpected("track.track.cues.length", 1); |
14 cue = testTrack.track.cues[0]; | 16 cue = testTrack.track.cues[0]; |
15 testExpected("cue.id", 1); | 17 testExpected("cue.id", 1); |
16 testExpected("cue.startTime / 60 / 60", 1234567); | 18 testExpected("cue.startTime / 60 / 60", 1234567); |
17 testExpected("cue.endTime / 60 / 60", 1234567890); | 19 testExpected("cue.endTime / 60 / 60", 1234567890); |
18 consoleWrite(""); | 20 consoleWrite(""); |
19 | 21 |
20 endTest(); | 22 endTest(); |
21 } | 23 } |
22 | 24 |
23 </script> | 25 </script> |
24 </head> | 26 </head> |
25 <body> | 27 <body> |
26 <video controls> | 28 <video controls> |
27 <track id="testTrack" src="captions-webvtt/large-timestamp.vtt" onlo
ad="loaded()" default> | 29 <track id="testTrack" src="captions-webvtt/large-timestamp.vtt" onlo
ad="loaded()" default> |
28 </video> | 30 </video> |
29 <p>Tests that a very large timestamp is parsed correctly.</p> | 31 <p>Tests that a very large timestamp is parsed correctly.</p> |
30 </body> | 32 </body> |
31 </html> | 33 </html> |
OLD | NEW |