Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d223b75e9edc14bcb4c722f4a8dce8380cf0cac1
      
https://github.com/WebKit/WebKit/commit/d223b75e9edc14bcb4c722f4a8dce8380cf0cac1
  Author: Richard Robinson <[email protected]>
  Date:   2026-07-10 (Fri, 10 Jul 2026)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKUserContentController.swift
    M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h
    M Source/WebKit/UIProcess/API/Swift/WebPage+FrameInfo.swift
    M Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer.h
    M Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer.mm
    M Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer.swift
    M Tools/TestWebKitAPI/Helpers/cocoa/WebPage+Extras.swift
    M Tools/TestWebKitAPI/Helpers/cocoa/WebPage+JavaScriptExpression.swift
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/JSHandle.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UserContentController.mm
    M 
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebViewSwiftOverlayTests.swift
    A Tools/TestWebKitAPI/Tests/WebKit/WebPage/JSHandleTests.swift
    A Tools/TestWebKitAPI/Tests/WebKit/WebPage/UserContentControllerTests.swift

  Log Message:
  -----------
  Follow-up to 316796@main to fix and improve tests
https://bugs.webkit.org/show_bug.cgi?id=318987
rdar://181840751

Reviewed by Abrar Rahman Protyasha and Alex Christensen.

There were a few issues with the tests added in 316796@main (a lot of style 
violations, no test coverage
for the WebPage API, abnormal compilation conditions, redundancy, etc).

Fix these issues by ultimately reducing duplication and just converting a few 
of the existing tests
to use the WebPage API, which is also much less verbose and improves 
readability/correctness anyways.

Tests: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/JSHandle.mm
       Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UserContentController.mm
       
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebViewSwiftOverlayTests.swift
       Tools/TestWebKitAPI/Tests/WebKit/WebPage/JSHandleTests.swift
       Tools/TestWebKitAPI/Tests/WebKit/WebPage/UserContentControllerTests.swift

* Source/WebKit/UIProcess/API/Cocoa/WKUserContentController.swift:
(WKUserContentController.addBuffer(_:name:to:)):
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore _storeWithConfiguration:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* Source/WebKit/UIProcess/API/Swift/WebPage+FrameInfo.swift:
* Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer.h:
* Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer.mm:
* Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer.swift:
(Configuration.httpsProxy):
* Tools/TestWebKitAPI/Helpers/cocoa/WebPage+Extras.swift:
(mainFrame):
* Tools/TestWebKitAPI/Helpers/cocoa/WebPage+JavaScriptExpression.swift:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/JSHandle.mm:
(TestWebKitAPI::getWindowFrameInfo): Deleted.
(TestWebKitAPI::TEST(JSHandle, Basic)): Deleted.
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UserContentController.mm:
(TEST(WKUserContentController, JSBufferInjectsWebKitNamespace)): Deleted.
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebViewSwiftOverlayTests.swift:
(WKWebViewSwiftOverlayTests.evaluateJavaScriptWithNilResponse):
(WKWebViewSwiftOverlayTests.wkUserContentControllerRefinements): Deleted.
(WKWebViewSwiftOverlayTests.wkJSHandleRefinements): Deleted.
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/JSHandleTests.swift: Added.
(JSHandleTests.basic):
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/UserContentControllerTests.swift: 
Added.
(UserContentControllerTests.jsBufferInjectsWebKitNamespace):

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



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

Reply via email to