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

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

Issue 14056005: Added code to enable the first caption track if the user has requested captions and one such track … (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 8 months 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>Test non-default track load according to user language preference.</t itle>
6 <script src=media-file.js></script>
7 <script src=media-controls.js></script>
8 <script src=video-test.js></script>
9 <script>
10 var track;
11
12 function startTest()
13 {
14 if (!window.eventSender) {
15 consoleWrite("No eventSender found.");
16 failTest();
17 }
18
19 findMediaElement();
20 testClosedCaptionsButtonVisibility(true);
21
22 consoleWrite("");
23 consoleWrite("** The captions track should be listed in textTracks, but disabled. **");
24 testExpected("video.textTracks.length", 2);
25 testExpected("video.textTracks[0].mode", "disabled");
26 testExpected("video.textTracks[1].mode", "disabled");
27
28 consoleWrite("");
29 consoleWrite("** Set the user language preference so that the track will be chosen when the CC button is clicked. **");
30 run("internals.setUserPreferredLanguages(['ar'])");
31 clickCCButton();
32 }
33
34 function loaded()
35 {
36 findMediaElement();
37 waitForEvent('canplaythrough', startTest);
38
39 video.src = findMediaFile('video', 'content/counting');
40 }
41 </script>
42 </head>
43 <body onload="loaded()">
44 <p>Tests that appropriate language track is loaded, according to user prefer ences.</p>
45 <video controls>
46 <track src="track/captions-webvtt/captions-fast.vtt" kind="captions">
47 <track src="track/captions-webvtt/captions-fast.vtt" kind="captions" src lang="ar" onload="endTest()">
48 </video>
49 </body>
50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698