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

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

Issue 1079323002: Support text track selection in video controls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and lgtm nits Created 4 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
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 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
9 (Please avoid writing new tests using video-test.js) -->
10 <script src=video-test.js></script>
11 <script>
12 var track;
13
14 function startTest()
15 {
16 if (!window.eventSender) {
17 consoleWrite("No eventSender found.");
18 failTest();
19 }
20
21 findMediaElement();
22 testClosedCaptionsButtonVisibility(true);
23
24 consoleWrite("");
25 consoleWrite("** The captions track should be listed in textTracks, but disabled. **");
26 testExpected("video.textTracks.length", 2);
27 testExpected("video.textTracks[0].mode", "disabled");
28 testExpected("video.textTracks[1].mode", "disabled");
29
30 consoleWrite("");
31 consoleWrite("** Set the user language preference so that the track will be chosen when the CC button is clicked. **");
32 run("internals.setUserPreferredLanguages(['ar'])");
33 clickCCButton();
34 }
35
36 function loaded()
37 {
38 findMediaElement();
39 waitForEvent('canplaythrough', startTest);
40
41 video.src = findMediaFile('video', 'content/counting');
42 }
43 </script>
44 </head>
45 <body onload="loaded()">
46 <p>Tests that appropriate language track is loaded, according to user prefer ences.</p>
47 <video controls>
48 <track src="track/captions-webvtt/captions-fast.vtt" kind="captions">
49 <track src="track/captions-webvtt/captions-fast.vtt" kind="captions" src lang="ar" onload="endTest()">
50 </video>
51 </body>
52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698