[iOS WK2] REGRESSION (r242687): Programmatic scroll of overflow scroll results in...
[WebKit-https.git] / LayoutTests / scrollingcoordinator / ios / programmatic-page-scroll.html
1 <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true internal:AsyncOverflowScrollingEnabled=true ] -->
2 <html>
3 <head>
4     <meta name="viewport" content="width=device-width">
5     <style>
6         body {
7             height: 2000px;
8         }
9         #scroller {
10             height: 300px;
11             width: 300px;
12             overflow: scroll;
13             -webkit-overflow-scrolling: touch;
14         }
15         
16         .box {
17             width: 100%;
18             height: 100%;
19         }
20         
21         .top {
22             background-color: red;
23         }
24
25         .bottom {
26             background-color: green;
27         }
28
29     </style>
30     <script>
31         if (window.testRunner)
32             testRunner.waitUntilDone();
33
34         function doTest()
35         {
36             setTimeout(() => {
37                 document.scrollingElement.scrollTop = 200;
38             }, 2000);
39             if (window.testRunner)
40                 testRunner.notifyDone();
41         }
42         
43         window.addEventListener('load', doTest, false);
44     </script>
45 </head>
46 <body>
47     <div id="scroller">
48         <div class="top box"></div>
49         <div class="bottom box"></div>
50     </div>
51 </body>
52 </html>