blob: c49eaba0eabb09cf3368891d2fa2f469ce81c226 [file] [log] [blame]
<script src="../../../resources/js-test-pre.js"></script>
<script src="../resources/media-controls-loader.js" type="text/javascript"></script>
<body>
<style type="text/css" media="screen">
video, #host {
position: absolute;
top: 0;
left: 0;
}
video {
width: 800px;
height: 240px;
}
</style>
<video src="../../content/test.wav" controls autoplay></video>
<div id="host"></div>
<script type="text/javascript">
window.jsTestIsAsync = true;
description("Testing that the fullscreen button is disabled for &lt;video> with an audio resource.");
const container = document.querySelector("div#host");
const media = document.querySelector("video");
const mediaController = createControls(container, media, null);
debug("Once media loads its metadata the fullscreen button should become disabled");
media.addEventListener("loadedmetadata", () => {
debug("Obtained loadedmetadata event");
shouldBeTrue("mediaController.isAudio");
shouldBeFalse("mediaController.controls.fullscreenButton.enabled");
debug("");
media.remove();
container.remove();
finishJSTest();
});
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>