| <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: new MacOSLayoutTraits(LayoutTraits.Mode.Inline) }); |
| |
| shouldBeEqualToString("airplayButton.element.localName", "button"); |
| shouldBeTrue('airplayButton.element.classList.contains("airplay")'); |
| shouldBe("airplayButton.iconName", "Icons.Airplay"); |
| |
| const macOSFullscreenAirplayButton = new AirplayButton({ layoutTraits: new MacOSLayoutTraits(LayoutTraits.Mode.Fullscreen) }); |
| const iOSAirplayButton = new AirplayButton({ layoutTraits: new IOSLayoutTraits(LayoutTraits.Mode.Inline) }); |
| |
| 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> |