Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fc3fbc51144216c80ebbbc06d60e407047e75d39
      
https://github.com/WebKit/WebKit/commit/fc3fbc51144216c80ebbbc06d60e407047e75d39
  Author: Zak Ridouh <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M Tools/TestWebKitAPI/Helpers/cocoa/Foundation+Extras.swift
    A Tools/TestWebKitAPI/Helpers/cocoa/SiteIsolationTestUtilities.swift
    M Tools/TestWebKitAPI/Helpers/cocoa/TestWKWebView.h
    M Tools/TestWebKitAPI/Helpers/cocoa/WKWebView+Extras.swift
    M Tools/TestWebKitAPI/PlatformCocoa.cmake
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.swift

  Log Message:
  -----------
  [Swift Testing] Add helpers for writing site isolation tests
https://bugs.webkit.org/show_bug.cgi?id=326293
rdar://189145614

Reviewed by Richard Robinson.

The site isolation API tests share helpers in SiteIsolationTestUtilities.h that 
Swift can't call. Add Swift counterparts,
so that site isolation tests can be written with Swift Testing. See 
https://webkit.org/b/326295 for tests that use them.

* Tools/TestWebKitAPI/Helpers/cocoa/Foundation+Extras.swift:
(ConditionTimedOut.description):
(waitForCondition(_:timeout:_:)): Moved from TextExtractionTests.swift so that 
other tests can use it. It throws
ConditionTimedOut on timeout, since the helpers library can't record a Swift 
Testing issue.
* Tools/TestWebKitAPI/Helpers/cocoa/SiteIsolationTestUtilities.swift: Added.
(WKWebViewConfiguration.init(httpsProxyFor:)):
(siteIsolatedWebViewAndDelegate(configuration:frame:)):
(WebViewWithFocusedCrossOriginIframe.mainFrameHTML):
(WebViewWithFocusedCrossOriginIframe.init(configuration:)):
(WKWebView.setSelection(in:script:expecting:)):
(WKWebView.firstChildFrame):
* Tools/TestWebKitAPI/Helpers/cocoa/TestWKWebView.h: Point the frame variants 
of the synchronous JavaScript evaluation
helpers at callJavaScript(returning:in:_:).
* Tools/TestWebKitAPI/Helpers/cocoa/WKWebView+Extras.swift:
(WKWebView.callJavaScript(returning:in:_:)):
(WKWebView.callJavaScript(in:_:)): Take the frame to call the function body in.
* Tools/TestWebKitAPI/PlatformCocoa.cmake:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.swift:
(waitForCondition(_:timeout:_:)): Deleted.

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



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

Reply via email to