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 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 7 (Please avoid writing new tests using video-test.js) --> |
6 <script src=../video-test.js></script> | 8 <script src=../video-test.js></script> |
7 <script> | 9 <script> |
8 | 10 |
9 function trackLoaded() | 11 function trackLoaded() |
10 { | 12 { |
11 consoleWrite("Test that cues with negative startTime are not add
ed:"); | 13 consoleWrite("Test that cues with negative startTime are not add
ed:"); |
12 testExpected("testTrack.track.cues.length", 4); | 14 testExpected("testTrack.track.cues.length", 4); |
13 run("textCue = new VTTCue(-3439332606, 3.4, 'Sausage?')"); | 15 run("textCue = new VTTCue(-3439332606, 3.4, 'Sausage?')"); |
14 run("testTrack.track.addCue(textCue)"); | 16 run("testTrack.track.addCue(textCue)"); |
15 testExpected("testTrack.track.cues.length", 4); | 17 testExpected("testTrack.track.cues.length", 4); |
16 | 18 |
17 consoleWrite("<br>Test that cues with negative startTime and neg
ative endTime are not added:"); | 19 consoleWrite("<br>Test that cues with negative startTime and neg
ative endTime are not added:"); |
(...skipping 16 matching lines...) Expand all Loading... |
34 </script> | 36 </script> |
35 | 37 |
36 </head> | 38 </head> |
37 <body> | 39 <body> |
38 <p>Tests negative timestamps.</p> | 40 <p>Tests negative timestamps.</p> |
39 <video> | 41 <video> |
40 <track id="testTrack" src="captions-webvtt/tc013-settings.vtt" onloa
d="trackLoaded()" default> | 42 <track id="testTrack" src="captions-webvtt/tc013-settings.vtt" onloa
d="trackLoaded()" default> |
41 </video> | 43 </video> |
42 </body> | 44 </body> |
43 </html> | 45 </html> |
OLD | NEW |