<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.py?duration=36001" 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 10 hours.");

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:00:05", () => {
        debug("");
        shadowRoot.host.remove();
        media.remove();
        finishJSTest();
    });
});

</script>
<script src="../../../../../resources/js-test-post.js"></script>
</body>
