blob: abacb5b8e19387f0ee2f6104a5950b8763f1d046 [file] [log] [blame]
<!DOCTYPE html>
<style>
#grid {
display: grid;
height: 300px;
}
#item {
overflow: scroll;
overflow-anchor: none;
}
#content {
height: 800px;
}
</style>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<div id="log"></div>
<div id="grid">
<div id="item">
<div id="content">AAA</div>
</div>
</div>
<script>
onload = () => {
var item = document.querySelector("#item");
item.scrollTo(0, 200);
document.querySelector("#content").innerHTML = "BBB";
test(() => {
assert_equals(item.scrollTop, 200);
}, "Checks that scroll position is kept when grid item content is modified.");
};
</script>