blob: fb7bf983ad9103cf4829e8c2b765d10ee7b807c6 [file] [log] [blame]
<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">
description("Testing the <code>MacOSFullscreenMediaControls</code> right container buttonMargin.");
window.jsTestIsAsync = true;
const mediaControls = new MacOSFullscreenMediaControls;
const rightContainer = mediaControls.bottomControlsBar.children[3];
let numberOfFrames = 0;
scheduler.frameDidFire = function()
{
numberOfFrames++;
if (numberOfFrames == 1) {
debug("4 enabled buttons")
shouldBe("rightContainer.buttonMargin", "16");
debug("");
mediaControls.tracksButton.enabled = false;
} else if (numberOfFrames == 2) {
debug("3 enabled buttons")
shouldBe("rightContainer.buttonMargin", "24");
mediaControls.pipButton.enabled = false;
debug("");
} else if (numberOfFrames == 3) {
debug("2 enabled buttons")
shouldBe("rightContainer.buttonMargin", "24");
debug("");
finishMediaControlsTest();
}
};
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>