blob: 8888f4c33277d47ac94860f84e53ae89a08bf16b [file] [log] [blame]
<script src="../../../resources/js-test-pre.js"></script>
<script src="../resources/media-controls-loader.js" type="text/javascript"></script>
<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
<body>
<script type="text/javascript">
window.jsTestIsAsync = true;
description("Testing the <code>TracksButton</code> class.");
const tracksButton = new TracksButton({ layoutTraits: new MacOSLayoutTraits(LayoutTraits.Mode.Inline) });
shouldBeEqualToString("tracksButton.element.localName", "button");
shouldBeTrue('tracksButton.element.classList.contains("tracks")');
shouldBe("tracksButton.iconName", "Icons.Tracks");
const fullscreenTracksButton = new TracksButton({ layoutTraits: new MacOSLayoutTraits(LayoutTraits.Mode.Fullscreen) });
shouldBecomeEqual('tracksButton.image.element.style.webkitMaskImage.includes("macOS/MediaSelector.svg")', "true", () => {
shouldBecomeEqual('fullscreenTracksButton.image.element.style.webkitMaskImage.includes("macOS/MediaSelector-fullscreen.svg")', "true", finishJSTest);
});
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>