blob: 1687de8c4c413e42d22c8066a76c281e4183dc4f [file] [log] [blame]
<meta charset="utf-8">
<script src="../../../resources/js-test-pre.js"></script>
<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
<script src="../resources/media-controls-loader.js" type="text/javascript"></script>
<body>
<script type="text/javascript">
window.jsTestIsAsync = true;
description("Testing the <code>AirplayButton</code> class.");
const airplayButton = new AirplayButton({ layoutTraits: LayoutTraits.macOS });
shouldBeEqualToString("airplayButton.element.localName", "button");
shouldBeTrue('airplayButton.element.classList.contains("airplay")');
shouldBe("airplayButton.iconName", "Icons.Airplay");
const macOSFullscreenAirplayButton = new AirplayButton({ layoutTraits: LayoutTraits.macOS | LayoutTraits.Fullscreen });
const iOSAirplayButton = new AirplayButton({ layoutTraits: LayoutTraits.iOS });
shouldBecomeEqual('airplayButton.image.element.style.webkitMaskImage.includes("macOS/Airplay.svg")', "true", () => {
shouldBecomeEqual('macOSFullscreenAirplayButton.image.element.style.webkitMaskImage.includes("macOS/Airplay-fullscreen.svg")', "true", () => {
shouldBecomeEqual('iOSAirplayButton.image.element.style.webkitMaskImage.includes("iOS/Airplay.svg")', "true", finishJSTest);
});
});
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>