blob: 278d60df3b91ff6f7d61da12396ecc00bc4a2825 [file] [log] [blame]
<script src="../../../resources/js-test-pre.js"></script>
<script src="../resources/media-controls-loader.js" type="text/javascript"></script>
<body>
<script type="text/javascript">
description("Testing an <code>IconButton</code> has a blue background-color when focused.");
window.jsTestIsAsync = true;
const button = new Button({ layoutDelegate: { layoutTraits: LayoutTraits.macOS }, iconName: Icons.Pause });
document.body.appendChild(button.element);
scheduler.frameDidFire = function ()
{
debug("Confirm inital icon button color.");
shouldBeEqualToString("window.getComputedStyle(button.image.element).backgroundColor", "rgba(255, 255, 255, 0.54902)");
button.element.focus();
debug("Confirm icon button color changed after focus.");
shouldNotBeEqualToString("window.getComputedStyle(button.image.element).backgroundColor", "rgba(255, 255, 255, 0.54902)");
finishJSTest();
}
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>