blob: 848d87d05848f8a43be09d7d8643b81914169ab4 [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=8000" 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 over 1 hour but less than 10.");
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", "0:00:05", () => {
debug("");
shadowRoot.host.remove();
media.remove();
finishJSTest();
});
});
</script>
<script src="../../../../../resources/js-test-post.js"></script>
</body>