Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 695318725b7de8269ea1cb9714e1b33fe8290f62
      
https://github.com/WebKit/WebKit/commit/695318725b7de8269ea1cb9714e1b33fe8290f62
  Author: Zak Ridouh <[email protected]>
  Date:   2026-05-09 (Sat, 09 May 2026)

  Changed paths:
    M Tools/TestWebKitAPI/Helpers/cocoa/WebPage+Extras.swift
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebPageMouseEventsTests.swift

  Log Message:
  -----------
  [Swift Testing] Add Swift mouse-event helpers for TestWKWebView
https://bugs.webkit.org/show_bug.cgi?id=312809
rdar://175191513

Reviewed by Richard Robinson.

Add a @MainActor extension on WebPage exposing simulate* mouse
helpers (mouseDown, mouseUp, mouseMove, mouseDrag, click, clicks,
rightClick) plus an async waitForPendingMouseEvents() that wraps
_doAfterProcessingAllPendingMouseEvents: with
withCheckedContinuation. Unblocks porting AppKit-heavy
SiteIsolation tests to Swift Testing without blocking the main
thread on Util::run.

* Tools/TestWebKitAPI/Helpers/cocoa/WebPage+Extras.swift:
(mouseDown(at:)):
(mouseUp(at:)):
(mouseMove(to:flags:)):
(mouseDrag(to:)):
(click(at:)):
(clicks(at:count:)):
(rightClick(at:)):
(waitForPendingMouseEvents):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebPageMouseEventsTests.swift: Added.
(WebPageMouseEventsTests.mouseDownUpFiresClickHandler):

Canonical link: https://commits.webkit.org/312960@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to