| Index: third_party/WebKit/LayoutTests/media/media-controls.js
|
| diff --git a/third_party/WebKit/LayoutTests/media/media-controls.js b/third_party/WebKit/LayoutTests/media/media-controls.js
|
| index ca52cb1810f6a9f713b60e33785c0528525f3e11..b923623ff72fe17809c197bc339bbf72e5c5e7a2 100644
|
| --- a/third_party/WebKit/LayoutTests/media/media-controls.js
|
| +++ b/third_party/WebKit/LayoutTests/media/media-controls.js
|
| @@ -99,6 +99,20 @@ function textTrackDisplayElement(parentElement, id, cueNumber)
|
| return displayElement;
|
| }
|
|
|
| +function isClosedCaptionsButtonVisible(currentMediaElement)
|
| +{
|
| + var captionsButtonElement = mediaControlsButton(currentMediaElement, "toggle-closed-captions-button");
|
| + var captionsButtonCoordinates = mediaControlsButtonCoordinates(currentMediaElement, "toggle-closed-captions-button");
|
| +
|
| + if (!captionsButtonElement.disabled
|
| + && captionsButtonCoordinates[0] > 0
|
| + && captionsButtonCoordinates[1] > 0) {
|
| + return true;
|
| + }
|
| +
|
| + return false;
|
| +}
|
| +
|
| function testClosedCaptionsButtonVisibility(expected)
|
| {
|
| try {
|
|
|