[Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointereven...
[WebKit-https.git] / LayoutTests / compositing / ios / overflow-scroll-touch-tiles.html
1 <!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
2 <html>
3 <head>
4     <style>
5         .scroll {
6             height: 300px;
7             width: 400px;
8             border: 2px solid black;
9             overflow: scroll;
10             -webkit-overflow-scrolling: touch;
11         }
12
13         .box {
14             width: 300px;
15             height: 2000px;
16             border: 1px solid black;
17             background-image: repeating-linear-gradient(180deg,rgb(26,198,204),rgb(26,198,204) 7%, rgb(100,100,100) 100%);
18         }
19
20     </style>
21     <script>
22         if (window.testRunner) {
23             testRunner.dumpAsText();
24             testRunner.waitUntilDone();
25         }
26         
27         function getUIScript()
28         {
29             return `
30             (function() {
31                 uiController.touchDownAtPoint(50, 300, 1, () => {
32                     uiController.dragFromPointToPoint(50, 300, 50, 50, 0.1, () => {
33                         uiController.liftUpAtPoint(50, 50, 1, () => {
34                             uiController.uiScriptComplete('');
35                         });
36                     });
37                 });
38             })();`
39         }
40
41         function dumpTiles(outputId)
42         {
43             if (window.internals)
44                 document.getElementById(outputId).innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_TILE_CACHES);
45         }
46         function doTest()
47         {
48             if (!testRunner.runUIScript)
49                 return;
50
51             dumpTiles('before-layers');
52
53             testRunner.runUIScript(getUIScript(), function(result) {
54                 dumpTiles('after-layers');
55                 if (window.testRunner)
56                     testRunner.notifyDone();
57             });
58         }
59         window.addEventListener('load', doTest, false);
60     </script>
61 </head>
62 <body>
63     <div class="scroll">
64         <div class="box"></div>
65     </div>
66
67 <pre id="before-layers">Layer tree goes here</pre>
68 <pre id="after-layers">Layer tree goes here</pre>
69 </body>
70 </html>