| <script src="../../../resources/js-test-pre.js"></script> |
| <script src="../resources/media-controls-loader.js" type="text/javascript"></script> |
| <script src="../resources/media-controls-utils.js" type="text/javascript"></script> |
| <body> |
| <video src="../../content/test.mp4" autoplay></video> |
| <div id="host"></div> |
| <script type="text/javascript"> |
| |
| window.jsTestIsAsync = true; |
| |
| description("Testing that control are shown in fullscreen when the controls attribute is not present."); |
| |
| const container = document.querySelector("div#host"); |
| const media = document.querySelector("video"); |
| const mediaController = createControls(container, media, null); |
| |
| media.addEventListener("play", () => { |
| media.addEventListener("webkitfullscreenchange", () => { |
| shouldBeTrue("media.webkitDisplayingFullscreen"); |
| shouldBeTrue("mediaController.controls.visible"); |
| button.remove(); |
| container.remove(); |
| media.remove(); |
| finishJSTest(); |
| }); |
| |
| const button = document.body.appendChild(document.createElement("div")); |
| button.setAttribute("style", "position: absolute; left: 0; top: 0;"); |
| button.innerText = "Enter fullscreen"; |
| button.addEventListener("click", () => media.webkitEnterFullscreen()); |
| pressOnElement(button); |
| }); |
| |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |