blob: da5e581eca0aa7a4818aaae6351ad7fee4c17d6b [file] [edit]
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
background: silver;
zoom: 1.25;
}
iframe {
position: absolute;
top: 50px;
width: 200px;
height: 200px;
overflow: auto;
}
</style>
</head>
<body>
<iframe src="about:blank"></iframe>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
function testScrollRepaint()
{
var frame = window.frames[0];
frame.onscroll = function() {
if (window.testRunner)
testRunner.notifyDone();
};
frame.scrollBy(-90, -90);
}
onload = async () => {
var frame = window.frames[0];
var doc = frame.document;
doc.body.style.backgroundColor = 'white';
doc.body.style.width = '2000px';
doc.body.style.height = '2000px';
doc.body.appendChild(doc.createTextNode('scroll me'));
frame.scrollBy(100, 100);
if (window.testRunner) {
await testRunner.displayAndTrackRepaints();
testScrollRepaint();
} else {
setTimeout(testScrollRepaint, 100);
}
}
</script>
</body>
</html>