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

Unified Diff: LayoutTests/media/media-controls.js

Issue 54713007: Hide the CC button for <audio> with <track>s (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add test Created 7 years, 1 month 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: LayoutTests/media/media-controls.js
diff --git a/LayoutTests/media/media-controls.js b/LayoutTests/media/media-controls.js
index e4c5d32043ad1ee0b0e7cea126e89ec238cd734f..325b1c844bb036779d80ae5ea88832dfb5f21f2c 100644
--- a/LayoutTests/media/media-controls.js
+++ b/LayoutTests/media/media-controls.js
@@ -79,8 +79,8 @@ function textTrackDisplayElement(parentElement, id, cueNumber)
function testClosedCaptionsButtonVisibility(expected)
{
try {
- captionsButtonElement = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-toggle-closed-captions-button");
- captionsButtonCoordinates = mediaControlsButtonCoordinates(video, "toggle-closed-captions-button");
+ captionsButtonElement = mediaControlsElement(internals.shadowRoot(mediaElement).firstChild, "-webkit-media-controls-toggle-closed-captions-button");
+ captionsButtonCoordinates = mediaControlsButtonCoordinates(mediaElement, "toggle-closed-captions-button");
} catch (exception) {
consoleWrite("Failed to find a closed captions button or its coordinates: " + exception);
if (expected)
@@ -90,12 +90,12 @@ function testClosedCaptionsButtonVisibility(expected)
consoleWrite("");
if (expected == true) {
- consoleWrite("** Caption button should be visible and enabled because we have a captions track.");
+ consoleWrite("** Caption button should be visible and enabled.");
testExpected("captionsButtonCoordinates[0]", 0, ">");
testExpected("captionsButtonCoordinates[1]", 0, ">");
testExpected("captionsButtonElement.disabled", false);
} else {
- consoleWrite("** Caption button should not be visible as there are no caption tracks.");
+ consoleWrite("** Caption button should not be visible.");
testExpected("captionsButtonCoordinates[0]", 0, "<=");
testExpected("captionsButtonCoordinates[1]", 0, "<=");
}
« no previous file with comments | « LayoutTests/media/audio-controls-captions-expected.txt ('k') | LayoutTests/media/video-controls-captions-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698