Bug 232847 - Convert more wheel event tests to UIHelper.mouseWheelSequence()
Summary: Convert more wheel event tests to UIHelper.mouseWheelSequence()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-08 13:43 PST by Simon Fraser (smfr)
Modified: 2021-11-09 07:29 PST (History)
4 users (show)

See Also:


Attachments
Patch (19.16 KB, patch)
2021-11-08 13:44 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (19.78 KB, patch)
2021-11-08 14:10 PST, Simon Fraser (smfr)
wenson_hsieh: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>