| <script src="../../../resources/js-test-pre.js"></script> |
| <script src="../resources/media-controls-loader.js" type="text/javascript"></script> |
| <body> |
| <video src="../../content/test.mp4" style="position: absolute; left: 0; top: 0; width: 400px;" autoplay controls muted playsinline></video> |
| <div id="shadow"></div> |
| <script type="text/javascript"> |
| |
| window.jsTestIsAsync = true; |
| |
| description("Testing the <code>TracksSupport</code> behavior with no tracks."); |
| |
| const media = document.querySelector("video"); |
| const shadowRoot = window.internals.shadowRoot(media); |
| |
| media.addEventListener("play", function() { |
| media.pause(); |
| |
| shouldBe("shadowRoot.querySelector('button.tracks').getBoundingClientRect().width", "0"); |
| |
| debug(""); |
| media.remove(); |
| finishJSTest(); |
| }); |
| |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |