blob: 912d865093ce02729cd6bbe33b8594e174de1c2f [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<style>
#box {
position: absolute;
left: 300px;
top: 150px;
width: 50px;
height: 50px;
background-color: yellow;
}
</style>
<div id="box"></div>
<div style="height: 900px"></div>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
runAfterLayoutAndPaint(function() {
var box = document.querySelector("#box");
scrollTo(0, 100);
box.style.backgroundColor = "green";
runAfterLayoutAndPaint(function() {
scrollTo(0, 0);
if (window.testRunner)
testRunner.notifyDone();
});
});
</script>