blob: b0ea98c54de76349ef9dbcdd354402e350a234af [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: LayoutTraits.macOS });
shouldBeEqualToString("tracksButton.element.localName", "button");
shouldBeTrue('tracksButton.element.classList.contains("tracks")');
shouldBe("tracksButton.iconName", "Icons.Tracks");
const fullscreenTracksButton = new TracksButton({ layoutTraits: LayoutTraits.macOS | LayoutTraits.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>