blob: e07439ef6abd45a138c9d0535506ae4a58bebc07 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<style>
input + div { color: pink }
</style>
<input id="searchInput" type="search"></input>
<div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<script>
description("Setting the incremental attribute on an input type=search")
shouldBeDefined(window.internals);
searchInput.offsetTop;
getComputedStyle(searchInput); // Force recalc.
searchInput.setAttribute("incremental", "");
// Ideally, the expected value below should be "0", but the search control
// button has its opacity changed unconditionally through inline style on
// every attribute change on the input element.
shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
</script>