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 numberOfTrackTests = 2; | 12 numberOfTrackTests = 2; |
11 | 13 |
12 function trackLoaded() | 14 function trackLoaded() |
13 { | 15 { |
14 numberOfTracksLoaded++; | 16 numberOfTracksLoaded++; |
15 if (numberOfTracksLoaded == numberOfTrackTests) { | 17 if (numberOfTracksLoaded == numberOfTrackTests) { |
16 for (var i = 0; i <= numberOfTrackTests; ++i) | 18 for (var i = 0; i <= numberOfTrackTests; ++i) |
17 testTrack(i); | 19 testTrack(i); |
18 } | 20 } |
19 } | 21 } |
20 | 22 |
21 function testTrack(i) | 23 function testTrack(i) |
22 { | 24 { |
23 findMediaElement(); | 25 findMediaElement(); |
24 var expected = | 26 var expected = |
25 [ | 27 [ |
26 { | 28 { |
27 length : 4, | 29 length : 4, |
28 tests: | 30 tests: |
29 [ | 31 [ |
30 { | 32 { |
31 property : "line", | 33 property : "line", |
32 values : [100, 15, "auto", 95], | 34 values : [100, 15, "auto", 95], |
33 }, | 35 }, |
34 { | 36 { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 </script> | 77 </script> |
76 </head> | 78 </head> |
77 <body onload="enableAllTextTracks()"> | 79 <body onload="enableAllTextTracks()"> |
78 <p>Tests WebVTT settings.</p> | 80 <p>Tests WebVTT settings.</p> |
79 <video> | 81 <video> |
80 <track src="captions-webvtt/tc013-settings.vtt" onload="trackLoaded(
)"> | 82 <track src="captions-webvtt/tc013-settings.vtt" onload="trackLoaded(
)"> |
81 <track src="captions-webvtt/tc013-settings-bad-separation.vtt" onloa
d="trackLoaded()"> | 83 <track src="captions-webvtt/tc013-settings-bad-separation.vtt" onloa
d="trackLoaded()"> |
82 </video> | 84 </video> |
83 </body> | 85 </body> |
84 </html> | 86 </html> |
OLD | NEW |