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

Unified Diff: third_party/WebKit/LayoutTests/media/video-controls-captions-multiple-clicks.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/media/video-controls-captions-multiple-clicks.html
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-captions-multiple-clicks.html b/third_party/WebKit/LayoutTests/media/video-controls-captions-multiple-clicks.html
deleted file mode 100644
index ad4d5e5742e7295a5d20540969389451c438432e..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/media/video-controls-captions-multiple-clicks.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Test closed caption button toggling.</title>
- <script src=media-file.js></script>
- <script src=media-controls.js></script>
- <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
- (Please avoid writing new tests using video-test.js) -->
- <script src=video-test.js></script>
- <script>
- var displayElement;
- var track;
- var text = ["First", "Second", "Third"];
-
- function addTextTrack()
- {
- track = video.addTextTrack('captions');
-
- for(var i = 0; i < 3; i++) {
- var cue = new VTTCue(0, 120, text[i]);
- track.addCue(cue);
- }
- }
-
- function checkCaptionsDisplay()
- {
- for (var i = 0; i < 3; i++) {
- try {
- displayElement = textTrackDisplayElement(video, 'display', i);
- testExpected("displayElement.innerText", text[i]);
- } catch(e) {
- consoleWrite(e);
- }
- }
- }
-
- function startTest()
- {
- if (!window.eventSender) {
- consoleWrite("No eventSender found.");
- failTest();
- }
-
- addTextTrack();
-
- findMediaElement();
- testClosedCaptionsButtonVisibility(true);
-
- consoleWrite("");
- consoleWrite("** The captions track should be listed in textTracks, but not yet loaded. **");
- testExpected("video.textTracks.length", 1);
- testExpected("video.textTracks[0].mode", "hidden");
- checkCaptionsDisplay();
-
- consoleWrite("");
- consoleWrite("** Captions track should become visible after button is clicked **");
- clickCCButton();
- checkCaptionsDisplay();
-
- consoleWrite("");
- consoleWrite("** Captions should not be visible after button is clicked again **");
- clickCCButton();
- checkCaptionsDisplay();
-
- consoleWrite("");
- consoleWrite("** Captions should become visible after button is clicked again **");
- clickCCButton();
- checkCaptionsDisplay();
-
- consoleWrite("");
- endTest();
- }
-
- function loaded()
- {
- findMediaElement();
- waitForEvent('canplaythrough', startTest);
-
- video.src = findMediaFile('video', 'content/counting');
- }
- </script>
-</head>
-<body onload="loaded()">
- <p>Tests that multiple toggles of the closed captions button still display captions</p>
- <video controls></video>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698