| <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>PiPButton</code> class."); |
| |
| const pipButton = new PiPButton({ layoutTraits: new MacOSLayoutTraits(LayoutTraits.Mode.Inline) }); |
| |
| shouldBeEqualToString("pipButton.element.localName", "button"); |
| shouldBeTrue('pipButton.element.classList.contains("pip")'); |
| shouldBe("pipButton.iconName", "Icons.EnterPiP"); |
| |
| const iOSPiPButton = new PiPButton({ layoutTraits: new IOSLayoutTraits(LayoutTraits.Mode.Inline) }); |
| |
| shouldBecomeEqual('pipButton.image.element.style.webkitMaskImage.includes("macOS/PipIn.svg")', "true", () => { |
| shouldBecomeEqual('iOSPiPButton.image.element.style.webkitMaskImage.includes("iOS/PipIn.svg")', "true", () => { |
| debug(""); |
| finishJSTest(); |
| }); |
| }); |
| |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |