blob: 8f37616c2fc1498cfb718768ba354082445ee8a9 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<style>
:-webkit-autofill { text-decoration: underline }
input + div { color: pink }
</style>
<input id="text" type="text"></input>
<div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<script>
description("Use descendant invalidation set for :-webkit-autofill pseudo class.")
shouldBeDefined(window.internals);
shouldBe("getComputedStyle(text, '').textDecorationLine", "'none'");
text.offsetTop; // Force recalc.
internals.setAutofilled(text, true);
shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
shouldBe("getComputedStyle(text, '').textDecorationLine", "'underline'");
</script>