blob: 440a4d40a0458a507ed6f5064fa86cdfa7701f52 [file] [log] [blame]
<script src="../../../../../resources/js-test-pre.js"></script>
<script src="/media-resources/modern-media-controls/resources/media-controls-loader.js"></script>
<body>
<video src="../../resources/hls/generate-vod.php?duration=800" style="width: 320px; height: 240px;" controls autoplay></video>
<div id="shadow"></div>
<script type="text/javascript">
window.jsTestIsAsync = true;
description("Testing the display of time labels with a video that is 10 minutes or more but less than 1 hour.");
const shadowRoot = document.querySelector("div#shadow").attachShadow({ mode: "open" });
const media = document.querySelector("video");
const mediaController = createControls(shadowRoot, media, null);
media.addEventListener("play", () => {
media.pause();
media.currentTime = 5;
shouldBecomeEqualToString("mediaController.controls.timeControl.elapsedTimeLabel.element.textContent", "00:05", () => {
debug("");
shadowRoot.host.remove();
media.remove();
finishJSTest();
});
});
</script>
<script src="../../../../../resources/js-test-post.js"></script>
</body>