blob: cd02ae31fe257d528d6f7f44e3aa343864d8f663 [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>RewindButton</code> class.");
iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
const rewindButton = new RewindButton({ layoutTraits: LayoutTraits.macOS });
shouldBeEqualToString("rewindButton.element.localName", "button");
shouldBeTrue('rewindButton.element.classList.contains("icon")');
shouldBeTrue('rewindButton.element.classList.contains("rewind")');
shouldBeEqualToString("rewindButton.iconName", `${Icons.Rewind}`);
scheduler.frameDidFire = function()
{
if (rewindButton.width == 0)
return;
shouldBeTrue('rewindButton.element.style.webkitMaskImage.includes("macOS/rewind@")');
finishMediaControlsTest();
};
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>