Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bc97b29b7be431f62ff530a295ba196278f2cab3
https://github.com/WebKit/WebKit/commit/bc97b29b7be431f62ff530a295ba196278f2cab3
Author: Ben Nham <[email protected]>
Date: 2026-09-01 (Tue, 01 Sep 2026)
Changed paths:
M Source/WebCore/CMakeLists.txt
M Source/WebCore/Configurations/WebCore.xcconfig
M Tools/TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig
M Tools/TestWebKitAPI/Helpers/PlatformUtilities.h
M Tools/TestWebKitAPI/Helpers/cocoa/Bundle+Extras.swift
M Tools/TestWebKitAPI/Helpers/cocoa/PlatformUtilitiesCocoa.mm
M Tools/TestWebKitAPI/Helpers/cocoa/WKWebViewConfigurationExtras.mm
M Tools/TestWebKitAPI/Helpers/cocoa/WebPageConfiguration+Extras.swift
M Tools/TestWebKitAPI/PlatformCocoa.cmake
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/NavigationAPI.mm
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/ProcessSwapOnNavigation.mm
Log Message:
-----------
Fix injected bundle tests in TestWebKitAPI CMake build
https://bugs.webkit.org/show_bug.cgi?id=322880
rdar://186126721
Reviewed by Elliott Williams.
This makes a couple of fixes to the CMake TestWebKitAPI build to make it more
closely match the
Xcode TestWebKitAPI build:
1. Give TestWebKitAPI an Info.plist. This gives it the correct bundle
identifier, which makes some
bundle ID-dependent tests pass.
2. Previously the Xcode produced a TestWebKitAPI injected bundle with a
non-standard `.bundle`
executable suffix like this:
`TestWebKitAPI.wkbundle/Contents/MacOS/TestWebKitAPI.bundle`. There
isn't a clean way to produce an injected bundle with that name and executable
name using the
built-in CMake BUNDLE target.
Instead, we make both Xcode and CMake produce an injected bundle with a more
standard bundle path,
namely `TestWebKitAPIPlugIn.wkbundle/Contents/MacOS/TestWebKitAPIPlugIn`. (I
also considered
`TestWebKitAPIBundle` and `TestWebKitAPIInjectedBundle` but both those names
are used for other
things in the build system.) The tests now access that injected bundle URL via
`testPlugInBundleURL()`.
3. I also updated the legacy C injected bundle (InjectedBundleTestWebKitAPI) to
use the appropriate
Info.plist.
Tested with TestWebKitAPI.WebKit.BundleParameters (modern bundle) and
TestWebKitAPI.WebKit.InjectedBundleBasic (legacy C bundle).
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/Configurations/WebCore.xcconfig:
* Tools/TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig:
* Tools/TestWebKitAPI/Helpers/PlatformUtilities.h:
* Tools/TestWebKitAPI/Helpers/cocoa/Bundle+Extras.swift:
(Bundle.testPlugInURL):
* Tools/TestWebKitAPI/Helpers/cocoa/PlatformUtilitiesCocoa.mm:
(TestWebKitAPI::Util::testPlugInBundleURL):
* Tools/TestWebKitAPI/Helpers/cocoa/WKWebViewConfigurationExtras.mm:
(+[WKWebViewConfiguration
_test_configurationWithTestPlugInClassName:configureJSCForTesting:]):
* Tools/TestWebKitAPI/Helpers/cocoa/WebPageConfiguration+Extras.swift:
* Tools/TestWebKitAPI/PlatformCocoa.cmake:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/NavigationAPI.mm:
(TestWebKitAPI::TEST(NavigationAPI, ClearWrappersWithNavigateEventListener)):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/ProcessSwapOnNavigation.mm:
((ProcessSwap, PageOverlayLayerPersistence)):
Canonical link: https://commits.webkit.org/320262@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications