blob: fd5141330b32604b33e17c755fb9dba6c3b8c0c9 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
<html>
<head>
<style>
* {
box-sizing: border-box;
}
body {
display: grid;
grid-template-rows: auto;
grid-template-areas: "main"
}
.scroller {
float: left;
width: 100%;
height: 100%;
border: 1px solid black;
overflow: scroll;
}
.content {
width: 200%;
height: 100%;
background-color: green;
}
body.changed .content {
width: 100%;
}
.box {
width: 100px;
height: 100px;
}
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
window.addEventListener('load', () => {
setTimeout(() => {
document.body.classList.add('changed');
if (window.testRunner)
testRunner.notifyDone();
}, 0);
}, false);
</script>
</head>
<body>
<div id="main">
<div class="scroller">
<div class="content">
<div class="box"></div>
</div>
</div>
</div>
</body>
</html>