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

Unified 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, 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/text-tracks-visibility-user-override.html
diff --git a/LayoutTests/media/text-tracks-visibility-user-override.html b/LayoutTests/media/text-tracks-visibility-user-override.html
new file mode 100644
index 0000000000000000000000000000000000000000..1ee6d1e0892eb9f902fa7c4cbba2b470a27b820f
--- /dev/null
+++ b/LayoutTests/media/text-tracks-visibility-user-override.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<script src="media-file.js"></script>
+<script src="video-test.js"></script>
+<script src="media-controls.js"></script>
+<script>
+
+ function setUserTextTracksEnabled(enabled) {
+ if (window.internals)
+ internals.settings.setTextTracksEnabled(enabled);
+ }
+
+ function checkCaptionsDisplay() {
+ testExpected("textTrackDisplayElement(video, 'display').innerText", "Lorem");
+ }
+
+ function startTest() {
+ consoleWrite("");
+ consoleWrite("Set user captions state to true and verify that the track is being displayed");
+ setUserTextTracksEnabled(true);
+ checkCaptionsDisplay();
+
+ consoleWrite("");
+ consoleWrite("Set user captions state to false and verify that no track is being displayed");
+ setUserTextTracksEnabled(false);
+ checkCaptionsDisplay();
fs 2015/05/04 14:58:26 Looks like this still tests for "Lorem"? (Still "p
+
+ consoleWrite("");
+ consoleWrite("Set user captions state to true again and verify that the track is being displayed");
+ setUserTextTracksEnabled(true);
+ checkCaptionsDisplay();
+
+ consoleWrite("");
+ endTest();
+ }
+
+ window.onload = function() {
+ consoleWrite("Test that closed captions visibility is overridden with user captions state setting");
+ findMediaElement();
+
+ video.src = findMediaFile("video", "content/test");
+ video.textTracks[0].mode = "hidden";
+
+ waitForEvent("canplaythrough", startTest);
+ }
+
+</script>
+<video controls>
+ <track src="track/captions-webvtt/captions.vtt" kind="captions">
+</video>
« 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