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 <title>Test closed caption button toggling.</title> | 5 <title>Test closed caption button toggling.</title> |
6 <script src=media-file.js></script> | 6 <script src=media-file.js></script> |
7 <script src=media-controls.js></script> | 7 <script src=media-controls.js></script> |
| 8 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 9 (Please avoid writing new tests using video-test.js) --> |
8 <script src=video-test.js></script> | 10 <script src=video-test.js></script> |
9 <script> | 11 <script> |
10 var track; | 12 var track; |
11 | 13 |
12 function addTextTrackThroughJS() | 14 function addTextTrackThroughJS() |
13 { | 15 { |
14 consoleWrite(""); | 16 consoleWrite(""); |
15 consoleWrite("** Add a text track through JS to the video element **
"); | 17 consoleWrite("** Add a text track through JS to the video element **
"); |
16 var t = video.addTextTrack('captions', 'English', 'en'); | 18 var t = video.addTextTrack('captions', 'English', 'en'); |
17 t.addCue(new VTTCue(0.0, 10.0, 'Some random caption text')); | 19 t.addCue(new VTTCue(0.0, 10.0, 'Some random caption text')); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 117 } |
116 </script> | 118 </script> |
117 </head> | 119 </head> |
118 <body onload="loaded()"> | 120 <body onload="loaded()"> |
119 <p>Tests that the closed captions button, when toggled, updates the text tra
ck display area.</p> | 121 <p>Tests that the closed captions button, when toggled, updates the text tra
ck display area.</p> |
120 <video controls> | 122 <video controls> |
121 <track src="track/captions-webvtt/captions-fast.vtt" kind="captions" onl
oad="testCCButtonToggling()"> | 123 <track src="track/captions-webvtt/captions-fast.vtt" kind="captions" onl
oad="testCCButtonToggling()"> |
122 </video> | 124 </video> |
123 </body> | 125 </body> |
124 </html> | 126 </html> |
OLD | NEW |