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

Side by Side Diff: LayoutTests/media/text-tracks-visibility-user-override.html

Issue 1118613002: Hook up Android closed captions 'enabled' setting to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed comments from tkent Created 5 years, 7 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
« no previous file with comments | « no previous file | LayoutTests/media/text-tracks-visibility-user-override-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="media-file.js"></script>
3 <script src="video-test.js"></script>
4 <script src="media-controls.js"></script>
5 <script>
6
7 function setUserTextTracksEnabled(enabled) {
8 if (window.internals)
9 internals.settings.setTextTracksEnabled(enabled);
10 }
11
12 function checkCaptionsDisplay() {
13 testExpected("textTrackDisplayElement(video, 'display').innerText", "Lor em");
14 }
15
16 function startTest() {
17 consoleWrite("");
18 consoleWrite("Set user captions state to true and verify that the track is being displayed");
19 setUserTextTracksEnabled(true);
20 checkCaptionsDisplay();
21
22 consoleWrite("");
23 consoleWrite("Set user captions state to false and verify that no track is being displayed");
24 setUserTextTracksEnabled(false);
25 checkCaptionsDisplay();
fs 2015/05/04 14:58:26 Looks like this still tests for "Lorem"? (Still "p
26
27 consoleWrite("");
28 consoleWrite("Set user captions state to true again and verify that the track is being displayed");
29 setUserTextTracksEnabled(true);
30 checkCaptionsDisplay();
31
32 consoleWrite("");
33 endTest();
34 }
35
36 window.onload = function() {
37 consoleWrite("Test that closed captions visibility is overridden with us er captions state setting");
38 findMediaElement();
39
40 video.src = findMediaFile("video", "content/test");
41 video.textTracks[0].mode = "hidden";
42
43 waitForEvent("canplaythrough", startTest);
44 }
45
46 </script>
47 <video controls>
48 <track src="track/captions-webvtt/captions.vtt" kind="captions">
49 </video>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/text-tracks-visibility-user-override-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698