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).
<rdar://problem/117291661>