Changeset 280937 in webkit
- Timestamp:
- Aug 11, 2021, 4:51:07 PM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body-expected.txt (modified) (1 diff)
-
fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html (modified) (4 diffs)
-
platform/ios-wk2/TestExpectations (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r280932 r280937 1 2021-08-11 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [ iOS ] fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html is a flaky timeout 4 https://bugs.webkit.org/show_bug.cgi?id=228672 5 rdar://81348960 6 7 Reviewed by Simon Fraser. 8 9 On rare occasion, this test times out when the synthesized swipe gesture fails to cause the scrollable overflow 10 container to scroll past an arbitrary scroll position threshold (previously 400px). Mitigate this by rewriting 11 the test, such that we'll swipe _until_ we scroll past the threshold (which has also been lowered to just 12 100px). 13 14 Additionally, rewrite parts of this test to be generally easier to follow; for example, remove the scroll event 15 listener and instead just synthesize swipe gestures until `scroller.scrollTop` crosses 100px. 16 17 * fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body-expected.txt: 18 * fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html: 19 * platform/ios-wk2/TestExpectations: Remove the failing test expectation. 20 1 21 2021-08-11 Chris Dumez <cdumez@apple.com> 2 22 -
trunk/LayoutTests/fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body-expected.txt
r248433 r280937 1 Verifies that tapping outside of a subscrollable region during momentum scrolling dispatches click events. To run the test manually, swipe up on the black box to scroll it; while scrolling, tap outside of the scrollable area. The page should observe click events. 1 Tap here 2 Verifies that tapping outside of a subscrollable region during momentum scrolling dispatches click events. To run the test manually, swipe up on the black box to scroll it; while scrolling, tap the red box and verify that a click event is dispatched. 2 3 3 4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 5 6 6 PASS scrolle r.scrollTop passed 4007 PASS Observed click event.7 PASS scrolled to minimum threshold 8 PASS observedClick is true 8 9 PASS successfullyParsed is true 9 10 -
trunk/LayoutTests/fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html
r269360 r280937 15 15 #scroller { 16 16 width: 100%; 17 height: 50%;17 height: 250px; 18 18 overflow: scroll; 19 19 border: 4px solid black; … … 30 30 31 31 #target { 32 width: 100%; 33 height: 50px; 34 margin-top: 1em; 32 width: 100px; 33 height: 100px; 34 margin-top: 50px; 35 background-color: tomato; 36 color: white; 37 line-height: 100px; 38 text-align: center; 35 39 } 36 40 </style> … … 39 43 <div id="content"></div> 40 44 </div> 41 <div id="target"> </div>45 <div id="target">Tap here</div> 42 46 <p id="description"></p> 43 47 <p id="console"></p> … … 45 49 <script> 46 50 jsTestIsAsync = true; 51 observedClick = false; 47 52 48 let reachedMinimumScrollPosition = false; 49 const minimumExpectedScrollTop = 400; 53 const minimumExpectedScrollTop = 100; 50 54 const scroller = document.getElementById("scroller"); 51 52 scroller.addEventListener("scroll", observeScrollEvent); 53 document.body.addEventListener("click", () => { 54 testPassed("Observed click event."); 55 noteTestProgress(); 56 }, { once: true }); 57 58 function noteTestProgress() { 59 if (!window.progress) 60 progress = 0; 61 if (++progress == 3) 62 finishJSTest(); 63 } 64 65 async function observeScrollEvent() { 66 if (!window.testRunner || scroller.scrollTop < minimumExpectedScrollTop || reachedMinimumScrollPosition) 67 return; 68 69 reachedMinimumScrollPosition = true; 70 testPassed(`scroller.scrollTop passed ${minimumExpectedScrollTop}`); 71 removeEventListener("scroll", observeScrollEvent); 72 await UIHelper.activateElement(document.getElementById("target")); 73 noteTestProgress(); 74 } 75 55 const target = document.getElementById("target"); 76 56 async function runTest() 77 57 { 78 description("Verifies that tapping outside of a subscrollable region during momentum scrolling dispatches click events. To run the test manually, swipe up on the black box to scroll it; while scrolling, tap outside of the scrollable area. The page should observe click events.");58 target.addEventListener("click", () => observedClick = true); 79 59 80 if (!window.testRunner) 81 return; 60 description("Verifies that tapping outside of a subscrollable region during momentum scrolling dispatches click events. To run the test manually, swipe up on the black box to scroll it; while scrolling, tap the red box and verify that a click event is dispatched."); 82 61 83 await UIHelper.dragFromPointToPoint(160, 200, 160, 50, 0.1); 84 noteTestProgress(); 62 while (scroller.scrollTop < minimumExpectedScrollTop) { 63 if (window.testRunner) 64 await UIHelper.dragFromPointToPoint(250, 200, 250, 20, 0.1); 65 await UIHelper.delayFor(200); 66 } 67 68 testPassed("scrolled to minimum threshold"); 69 70 if (window.testRunner) 71 await UIHelper.activateElement(target); 72 73 shouldBe("observedClick", "true"); 74 finishJSTest(); 85 75 } 86 76 </script> -
trunk/LayoutTests/platform/ios-wk2/TestExpectations
r280794 r280937 1851 1851 webkit.org/b/214598 fast/scrolling/ios/autoscroll-input-when-very-zoomed.html [ Pass Failure ] 1852 1852 1853 webkit.org/b/228672 fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html [ Pass Timeout ]1854 1855 1853 http/tests/in-app-browser-privacy/ [ Pass ] 1856 1854
Note:
See TracChangeset
for help on using the changeset viewer.