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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-controls-track-selection-menu.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 <script src="media-file.js"></script>
3 <!-- TODO(srivats): Convert test to testharness.js. crbug.com/588956
4 (Please avoid writing new tests using video-test.js) -->
5 <script src="video-test.js"></script>
6 <script src="media-controls.js"></script>
7 <script>
8
9 function startTest()
10 {
11 findMediaElement();
12 testClosedCaptionsButtonVisibility(true);
13 consoleWrite("");
14 testExpected("video.textTracks.length", 2);
15 testExpected("video.textTracks[0].mode", "hidden");
16 testExpected("video.textTracks[1].mode", "hidden");
17
18 consoleWrite("");
19 consoleWrite("Select track 0 and verify it is displayed");
20 selectTextTrack(video, 0);
21 testExpected("video.textTracks[0].mode", "showing");
22 testExpected("video.textTracks[1].mode", "hidden");
23 testExpected("textTrackDisplayElement(video, 'display').innerText", "Lor em");
24
25 consoleWrite("");
26 consoleWrite("Select track 1 and verify it is displayed");
27 selectTextTrack(video, 1);
28 testExpected("video.textTracks[0].mode", "disabled");
29 testExpected("video.textTracks[1].mode", "showing");
30 testExpected("textTrackDisplayElement(video, 'display').innerText", "fir st caption");
31
32 consoleWrite("");
33 endTest();
34 }
35
36 window.onload = function()
37 {
38 consoleWrite("Test that we can display a track list menu and select trac ks from the list");
39 findMediaElement();
40 video.src = findMediaFile("video", "content/test");
41 enableAllTextTracks();
42 waitForEvent("canplaythrough", startTest);
43 }
44
45 </script>
46 <video controls>
47 <track src="track/captions-webvtt/captions.vtt" kind="captions" label="Track 1">
48 <track src="track/captions-webvtt/long-word.vtt" kind="captions" label="Trac k2">
49 </video>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698