| <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true AsyncOverflowScrollingEnabled=true ] --> |
| <html> |
| <head> |
| <meta name="viewport" content="width=device-width"> |
| <style> |
| #scroller { |
| height: 300px; |
| width: 300px; |
| overflow: scroll; |
| -webkit-overflow-scrolling: touch; |
| } |
| |
| .box { |
| width: 100%; |
| height: 100%; |
| } |
| |
| .top { |
| background-color: red; |
| } |
| |
| .bottom { |
| background-color: green; |
| } |
| |
| </style> |
| <script> |
| function doTest() |
| { |
| scroller.scrollTop = 500; |
| } |
| |
| window.addEventListener('load', doTest, false); |
| </script> |
| </head> |
| <body> |
| <div id="scroller"> |
| <div class="top box"></div> |
| <div class="bottom box"></div> |
| </div> |
| </body> |
| </html> |