| <!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="width: 320px; height: 240px;" controls autoplay></video> |
| <script type="text/javascript"> |
| |
| window.jsTestIsAsync = true; |
| |
| description("Showing the tracks panel in fullscreen."); |
| |
| const media = document.querySelector("video"); |
| |
| media.addEventListener("webkitfullscreenchange", () => { |
| if (!media.webkitDisplayingFullscreen) |
| return; |
| |
| shouldBecomeDifferent(`internals.shadowRoot(media).querySelector("button.tracks")`, "null", () => { |
| shouldBecomeDifferent(`internals.shadowRoot(media).querySelector("button.tracks").getBoundingClientRect().width`, "0", () => { |
| shouldBecomeEqual(`internals.shadowRoot(media).querySelector("button.tracks").getBoundingClientRect().right`, "582", () => { |
| pressOnElement(internals.shadowRoot(media).querySelector("button.tracks")); |
| shouldBecomeDifferent(`internals.shadowRoot(media).querySelector('.tracks-panel')`, "null", () => { |
| shouldBeEqualToString("internals.shadowRoot(media).querySelector('.tracks-panel').style.right", "218px"); |
| shouldBeEqualToString("internals.shadowRoot(media).querySelector('.tracks-panel').style.bottom", "101px"); |
| debug(""); |
| media.remove(); |
| finishJSTest(); |
| }); |
| }); |
| }); |
| }); |
| }); |
| |
| media.addEventListener("play", () => { |
| media.pause(); |
| shouldBecomeDifferent(`internals.shadowRoot(media).querySelector("button.fullscreen")`, "null", () => { |
| shouldBecomeDifferent(`internals.shadowRoot(media).querySelector("button.fullscreen").getBoundingClientRect().width`, "0", () => { |
| pressOnElement(internals.shadowRoot(media).querySelector(`button.fullscreen`)); |
| }); |
| }); |
| }); |
| |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |