blob: 0b079617e92a7cc458d7cbb1b3342a95923c1a0c [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>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>