<!doctype HTML>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<select id="target" size="2">
<option> value 1</option>
<option> value 2</option>
<option> value 3</option>
<option> value 4</option>
</select>
<script>
if (window.internals) {
internals.settings.setPreferCompositingToLCDTextEnabled(true);
}
function assertLayers(expected_count) {
var json = internals.layerTreeAsText(document);
assert_equals(JSON.parse(json).layers.length, expected_count, json);
}
test(() => {
assertLayers(2);
}, "scrollable");
test(() => {
target.size = 4;
assertLayers(1);
}, "not scrollable");
</script>