Bug 263154 - WebDriver: Extra mousemove event fired to subsequent promise_test instance when exercising pointerMove Actions API
Summary: WebDriver: Extra mousemove event fired to subsequent promise_test instance wh...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2023-10-13 20:09 PDT by Abrar Rahman Protyasha
Modified: 2023-10-20 20:10 PDT (History)
4 users (show)

See Also:


Attachments
Bug repro test file (1.17 KB, text/html)
2023-10-13 20:09 PDT, Abrar Rahman Protyasha
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Abrar Rahman Protyasha 2023-10-13 20:09:57 PDT
Created attachment 468210 [details]
Bug repro test file

If there are two tests `promise_test` instances in a single WPT and invoke the test driver Actions API, the latter gets an unexpected `mousemove` event as soon as it instantiates `test_driver.Actions()` every time the former makes use of the `Actions.pointerMove()` method.

This causes us to fail tests like web platform tests like uievents/mouse/mousemove_prevent_default_action.tentative.html (https://wpt.fyi/results/uievents/mouse/mousemove_prevent_default_action.tentative.html) which logs `mousemove` events.

This seems to be coming from our implementation of the Release Actions command of the WebDriver spec (https://www.w3.org/TR/webdriver2/#release-actions), because tracing the origin of the extra mousemove event leads to `WebAutomationSession::cancelInteractionSequence`, which dispatches a key frame sequence obtained from `SimulatedInputKeyFrame::keyFrameToResetInputSources`. Maybe our implementation of the spec is a bit buggy here?

I've attached a simplified WPT that demonstrates this bug. This test only fails when run through safaridriver and not when run through a ToT WebKitTestRunner (WKTR) application. Similarly, this test does not fail on ChromeDriver 117.0.5938.149 or geckodriver 0.33.0 (a80e5fd61076 2023-04-02 18:31 +0000).
Comment 1 Radar WebKit Bug Importer 2023-10-20 20:10:14 PDT
<rdar://problem/117291661>