| Index: third_party/WebKit/LayoutTests/virtual/android/media/controls/overlay-play-button.js
|
| diff --git a/third_party/WebKit/LayoutTests/virtual/android/media/controls/overlay-play-button.js b/third_party/WebKit/LayoutTests/virtual/android/media/controls/overlay-play-button.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ae9f03cb98374f4aad81ef5d9d7298ba4671b9ec
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/virtual/android/media/controls/overlay-play-button.js
|
| @@ -0,0 +1,30 @@
|
| +// Defined in core/html/shadow/MediaControls.cpp.
|
| +var MIN_VIDEO_WIDTH = 48;
|
| +var MIN_VIDEO_HEIGHT = 164;
|
| +
|
| +function assertOverlayPlayButtonVisible(videoElement) {
|
| + assert_true(isVisible(overlayPlayButton(videoElement)),
|
| + "overlay play button should be visible");
|
| +}
|
| +
|
| +function assertOverlayPlayButtonNotVisible(videoElement) {
|
| + assert_false(isVisible(overlayPlayButton(videoElement)),
|
| + "overlay play button should not be visible");
|
| +}
|
| +
|
| +function overlayPlayButton(videoElement) {
|
| + var controlID = '-webkit-media-controls-overlay-play-button';
|
| + var button = mediaControlsElement(
|
| + window.internals.shadowRoot(videoElement).firstChild,
|
| + controlID);
|
| + if (!button)
|
| + throw 'Failed to find overlay play button';
|
| + return button;
|
| +}
|
| +
|
| +function isVisible(button) {
|
| + var computedStyle = getComputedStyle(button);
|
| + return computedStyle.display !== "none" &&
|
| + computedStyle.display !== "hidden" &&
|
| + computedStyle.visibility === "visible";
|
| +}
|
|
|