blob: c0c077f6a0b56e5be96c029231e8adac3a138b23 [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>MuteButton</code> class.");
const muteButton = new MuteButton({ layoutTraits: new MacOSLayoutTraits(LayoutTraits.Mode.Inline) });
shouldBeEqualToString("muteButton.element.localName", "button");
shouldBeTrue('muteButton.element.classList.contains("mute")');
shouldBeTrue("muteButton.muted");
shouldBecomeEqual("muteButton.iconName", "Icons.VolumeMutedRTL", () => {
shouldBecomeEqual('muteButton.image.element.style.webkitMaskImage.includes("macOS/VolumeMuted-RTL.svg")', "true", () => {
debug("Unmuting...");
muteButton.muted = false;
shouldBeFalse("muteButton.muted");
shouldBecomeEqual("muteButton.iconName", "Icons.Volume3RTL", () => {
shouldBecomeEqual('muteButton.image.element.style.webkitMaskImage.includes("macOS/Volume3-RTL.svg")', "true", finishJSTest);
});
});
});
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>