blob: c361cfc886304efb989d6f9fd392d42945eaa620 [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: new MacOSLayoutTraits(LayoutTraits.Mode.Inline) }, 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.55)");
button.element.focus();
debug("Confirm icon button color changed after focus.");
shouldNotBeEqualToString("window.getComputedStyle(button.image.element).backgroundColor", "rgba(255, 255, 255, 0.55)");
finishJSTest();
}
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>