Changeset 243281 in webkit
- Timestamp:
- Mar 21, 2019, 1:25:18 AM (7 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 7 edited
-
ChangeLog (modified) (1 diff)
-
fast/scrolling/ios/overflow-scroll-overlap-2.html (modified) (2 diffs)
-
fast/scrolling/ios/overflow-scroll-overlap-3.html (modified) (2 diffs)
-
fast/scrolling/ios/overflow-scroll-overlap-4.html (modified) (2 diffs)
-
fast/scrolling/ios/overflow-scroll-overlap.html (modified) (2 diffs)
-
fast/scrolling/resources/overflow-scroll-overlap.js (modified) (1 diff)
-
resources/ui-helper.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r243276 r243281 1 2019-03-21 Antti Koivisto <antti@apple.com> 2 3 Use immediateScrollElementAtContentPointToOffset for scroll overlap tests 4 https://bugs.webkit.org/show_bug.cgi?id=195943 5 6 Reviewed by Simon Fraser. 7 8 This is much faster and simpler than simulated touch events. 9 10 * fast/scrolling/ios/overflow-scroll-overlap-2.html: 11 * fast/scrolling/ios/overflow-scroll-overlap-3.html: 12 * fast/scrolling/ios/overflow-scroll-overlap-4.html: 13 * fast/scrolling/ios/overflow-scroll-overlap.html: 14 15 This API doesn't respect touch-action property, so stop using it. Instead restore 16 the main scrollview to the initial position explicitly after scroll. 17 18 * fast/scrolling/resources/overflow-scroll-overlap.js: 19 (async.runTest): 20 * resources/ui-helper.js: 21 (return.new.Promise.): 22 (return.new.Promise): 23 24 Add a Promise returning helper. 25 1 26 2019-03-20 Youenn Fablet <youenn@apple.com> 2 27 -
trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-2.html
r243134 r243281 3 3 <head> 4 4 <meta name="viewport" content="width=device-width, initial-scale=1"> 5 <script src="../../../resources/ui-helper.js"></script> 6 <script src="../resources/overflow-scroll-overlap.js"></script> 5 7 <style> 6 body {7 touch-action: none;8 }9 8 .case { 10 9 width: 200px; … … 57 56 } 58 57 </style> 59 <script src="../../../resources/basic-gestures.js"></script>60 <script src="../resources/overflow-scroll-overlap.js"></script>61 58 </head> 62 59 <body onload="runTest()"> -
trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3.html
r243134 r243281 3 3 <head> 4 4 <meta name="viewport" content="width=device-width, initial-scale=1"> 5 <script src="../../../resources/ui-helper.js"></script> 6 <script src="../resources/overflow-scroll-overlap.js"></script> 5 7 <style> 6 body {7 touch-action: none;8 }9 8 .case { 10 9 width: 200px; … … 49 48 } 50 49 </style> 51 <script src="../../../resources/basic-gestures.js"></script>52 <script src="../resources/overflow-scroll-overlap.js"></script>53 50 </head> 54 51 <body onload="runTest()"> -
trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4.html
r243134 r243281 3 3 <head> 4 4 <meta name="viewport" content="width=device-width, initial-scale=1"> 5 <script src="../../../resources/ui-helper.js"></script> 6 <script src="../resources/overflow-scroll-overlap.js"></script> 5 7 <style> 6 body {7 touch-action: none;8 }9 8 .case { 10 9 width: 200px; … … 49 48 } 50 49 </style> 51 <script src="../../../resources/basic-gestures.js"></script>52 <script src="../resources/overflow-scroll-overlap.js"></script>53 50 </head> 54 51 <body onload="runTest()"> -
trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap.html
r243134 r243281 3 3 <head> 4 4 <meta name="viewport" content="width=device-width, initial-scale=1"> 5 <script src="../../../resources/ui-helper.js"></script> 6 <script src="../resources/overflow-scroll-overlap.js"></script> 5 7 <style> 6 body {7 touch-action: none;8 }9 8 .case { 10 9 width: 150px; … … 49 48 } 50 49 </style> 51 <script src="../../../resources/basic-gestures.js"></script>52 <script src="../resources/overflow-scroll-overlap.js"></script>53 50 </head> 54 51 <body onload="runTest()"> -
trunk/LayoutTests/fast/scrolling/resources/overflow-scroll-overlap.js
r243134 r243281 47 47 const centerX = (rect.left + rect.right) / 2; 48 48 const centerY = (rect.top + rect.bottom) / 2; 49 await touchAndDragFromPointToPoint(centerX, centerY, centerX, centerY - 30); 50 await liftUpAtPoint(centerX, centerY - 30); 51 await sleep(500); 49 await UIHelper.immediateScrollElementAtContentPointToOffset(centerX, centerY, 0, 30); 50 51 // Restore the main scroll view to the original position in case it moved. 52 await UIHelper.immediateScrollElementAtContentPointToOffset(5, 5, 0, 0); 53 54 await UIHelper.ensurePresentationUpdate(); 52 55 53 56 testcase.style.display = 'none'; -
trunk/LayoutTests/resources/ui-helper.js
r243241 r243281 287 287 } 288 288 289 static immediateScrollElementAtContentPointToOffset(x, y, scrollX, scrollY) 290 { 291 if (!this.isWebKit2()) 292 return Promise.resolve(); 293 294 return new Promise(resolve => { 295 testRunner.runUIScript(` 296 uiController.immediateScrollElementAtContentPointToOffset(${x}, ${y}, ${scrollX}, ${scrollY});`, resolve); 297 }); 298 } 299 289 300 static ensureVisibleContentRectUpdate() 290 301 {
Note:
See TracChangeset
for help on using the changeset viewer.