Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: LayoutTests/media/video-controls-captions.html

Issue 72543003: Update TextTrackCue tests to use VTTCue where appropriate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <script src=video-test.js></script> 8 <script src=video-test.js></script>
9 <script> 9 <script>
10 var track; 10 var track;
11 11
12 function addTextTrackThroughJS() 12 function addTextTrackThroughJS()
13 { 13 {
14 consoleWrite(""); 14 consoleWrite("");
15 consoleWrite("** Add a text track through JS to the video element ** "); 15 consoleWrite("** Add a text track through JS to the video element ** ");
16 var t = video.addTextTrack('captions', 'English', 'en'); 16 var t = video.addTextTrack('captions', 'English', 'en');
17 t.addCue(new TextTrackCue(0.0, 10.0, 'Some random caption text')); 17 t.addCue(new VTTCue(0.0, 10.0, 'Some random caption text'));
18 } 18 }
19 19
20 function addUnloadableHTMLTrackElement() 20 function addUnloadableHTMLTrackElement()
21 { 21 {
22 consoleWrite(""); 22 consoleWrite("");
23 consoleWrite("** Add non-default text track through HTML with unload able URI **"); 23 consoleWrite("** Add non-default text track through HTML with unload able URI **");
24 24
25 track = document.createElement("track"); 25 track = document.createElement("track");
26 track.setAttribute("kind", "captions"); 26 track.setAttribute("kind", "captions");
27 track.setAttribute("srclang", "en"); 27 track.setAttribute("srclang", "en");
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 </script> 116 </script>
117 </head> 117 </head>
118 <body onload="loaded()"> 118 <body onload="loaded()">
119 <p>Tests that the closed captions button, when toggled, updates the text tra ck display area.</p> 119 <p>Tests that the closed captions button, when toggled, updates the text tra ck display area.</p>
120 <video controls> 120 <video controls>
121 <track src="track/captions-webvtt/captions-fast.vtt" kind="captions" onl oad="testCCButtonToggling()"> 121 <track src="track/captions-webvtt/captions-fast.vtt" kind="captions" onl oad="testCCButtonToggling()">
122 </video> 122 </video>
123 </body> 123 </body>
124 </html> 124 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698