Chromium Code Reviews| 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..1c7f0893f09a90df1ea851815f8642033c78b27f 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) |
| +{ |
| + captionsButtonElement = mediaControlsButton(currentMediaElement, "toggle-closed-captions-button"); |
|
fs
2016/05/25 13:07:30
Make these local to the function too ('var caption
|
| + captionsButtonCoordinates = mediaControlsButtonCoordinates(currentMediaElement, "toggle-closed-captions-button"); |
| + |
| + if (!captionsButtonElement.disabled |
| + && captionsButtonCoordinates[0] > 0 |
| + && captionsButtonCoordinates[1] > 0) { |
| + return true; |
| + } |
| + |
| + return false; |
| +} |
| + |
| function testClosedCaptionsButtonVisibility(expected) |
| { |
| try { |