blob: bda5141ab02ed099b02c911a38d1d38843fa0b31 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test-pre.js"></script>
<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
<body>
<video src="../../content/CC+Subtitles.mov" style="position: absolute; left: 0; top: 0; width: 400px;" autoplay controls muted playsinline></video>
<script type="text/javascript">
window.jsTestIsAsync = true;
description("Ensure that the captions container accounts for the controls bar when visible.");
const media = document.querySelector("video");
const shadowRoot = window.internals.shadowRoot(media);
media.addEventListener("play", () => {
media.pause();
shouldBeEqualToString("getComputedStyle(shadowRoot.lastElementChild.firstElementChild).height", "calc(100% - 37px)");
media.remove();
finishJSTest();
});
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>