Index: LayoutTests/media/video-controls-overlay-play-button.html |
diff --git a/LayoutTests/media/video-controls-overlay-play-button.html b/LayoutTests/media/video-controls-overlay-play-button.html |
index d8d4bc37af6c0dbd6e8163277bb204b1ea3b711a..0abfc7c5e82dbb9e6c6a871962a3f17ad6171e23 100644 |
--- a/LayoutTests/media/video-controls-overlay-play-button.html |
+++ b/LayoutTests/media/video-controls-overlay-play-button.html |
@@ -10,6 +10,10 @@ |
{ |
window.internals.settings.setMediaControlsOverlayPlayButtonEnabled(true); |
+ // Add element dynamically, since otherwise the controls are created, but |
+ // hidden, before the setting is set, causing the setting to be ignored. |
+ addVideoElement(); |
+ |
findMediaElement(); |
video.controls = true; |
@@ -21,6 +25,11 @@ |
video.src = findMediaFile('video', 'content/test'); |
} |
+ function addVideoElement() { |
+ element = document.createElement('video'); |
+ document.body.appendChild(element); |
+ } |
+ |
function loadeddata() |
{ |
waitForEventOnce('play', play1); |
@@ -67,6 +76,5 @@ |
</head> |
<body onload="start()"> |
<p>Test that the overlay play button respects the controls attribute</p> |
- <video></video> |
</body> |
</html> |