Bug 232847

Summary: Convert more wheel event tests to UIHelper.mouseWheelSequence()
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Tools / TestsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: ntim, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch wenson_hsieh: review+

Description Simon Fraser (smfr) 2021-11-08 13:43:12 PST
Convert more wheel event tests to UIHelper.mouseWheelSequence()
Comment 1 Simon Fraser (smfr) 2021-11-08 13:44:24 PST
Created attachment 443598 [details]
Patch
Comment 2 Tim Nguyen (:ntim) 2021-11-08 13:49:19 PST
Comment on attachment 443598 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=443598&action=review

You can simplify the code in ui-helper.js

> LayoutTests/resources/ui-helper.js:111
> +    static async mouseWheelSequence(eventStream, options)

static async mouseWheelSequence(eventStream, { waitForCompletion = true })

> LayoutTests/resources/ui-helper.js:119
> +        const waitForScrollCompletion = options?.waitForCompletion ?? true;
> +        if (waitForScrollCompletion)

if (waitForCompletion)

> LayoutTests/resources/ui-helper.js:132
> +        if (waitForScrollCompletion)

ditto
Comment 3 Tim Nguyen (:ntim) 2021-11-08 13:56:36 PST
Comment on attachment 443598 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=443598&action=review

> LayoutTests/fast/scrolling/mac/momentum-axis-locking.html:162
> +            await UIHelper.mouseWheelSequence({ events: events });

here and below: 

{ events: events } -> { events }

works as well
Comment 4 Wenson Hsieh 2021-11-08 14:09:44 PST
Comment on attachment 443598 [details]
Patch

r=me (with Tim's suggestions)
Comment 5 Simon Fraser (smfr) 2021-11-08 14:10:31 PST
Created attachment 443604 [details]
Patch
Comment 6 Simon Fraser (smfr) 2021-11-09 07:28:24 PST
https://trac.webkit.org/changeset/285498/webkit
Comment 7 Radar WebKit Bug Importer 2021-11-09 07:29:21 PST
<rdar://problem/85201668>