OLD | NEW |
(Empty) | |
| 1 // Defined in core/html/shadow/MediaControls.cpp. |
| 2 var MIN_VIDEO_WIDTH = 48; |
| 3 var MIN_VIDEO_HEIGHT = 164; |
| 4 |
| 5 function assertOverlayPlayButtonVisible(videoElement) { |
| 6 assert_true(isVisible(overlayPlayButton(videoElement)), |
| 7 "overlay play button should be visible"); |
| 8 } |
| 9 |
| 10 function assertOverlayPlayButtonNotVisible(videoElement) { |
| 11 assert_false(isVisible(overlayPlayButton(videoElement)), |
| 12 "overlay play button should not be visible"); |
| 13 } |
| 14 |
| 15 function overlayPlayButton(videoElement) { |
| 16 var controlID = '-webkit-media-controls-overlay-play-button'; |
| 17 var button = mediaControlsElement( |
| 18 window.internals.shadowRoot(videoElement).firstChild, |
| 19 controlID); |
| 20 if (!button) |
| 21 throw 'Failed to find overlay play button'; |
| 22 return button; |
| 23 } |
| 24 |
| 25 function isVisible(button) { |
| 26 var computedStyle = getComputedStyle(button); |
| 27 return computedStyle.display !== "none" && |
| 28 computedStyle.display !== "hidden" && |
| 29 computedStyle.visibility === "visible"; |
| 30 } |
OLD | NEW |