blob: 40a14f6be21cb00749249fc94467827e08ecdc80 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ AsyncFrameScrollingEnabled=true ] -->
<html>
<head>
<style>
body {
margin: 0;
}
iframe {
position: relative;
margin: 10px;
border: none;
width: 300px;
height: 300px;
}
.scrollbar-hider {
position: absolute;
width: 16px;
height: 300px;
top: 10px;
left: calc(310px - 16px);
background-color: gray;
}
</style>
<script>
function doTest()
{
let iframe = document.getElementById('test-frame');
iframe.contentDocument.scrollingElement.scrollTop = 300;
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<iframe id="test-frame" srcdoc="
<style>
body {
height: 2000px;
margin: 0;
}
.box {
margin-top: 300px;
width: 300px;
height: 300px;
background-color: green;
}
</style>
<body>
<div class='box'></div>
</body>
"></iframe>
<div class="scrollbar-hider"></div>
</body>
</html>