Bug 314604

Summary: [CMake] Build TestWebKitAPI.wkbundle on Mac
Product: WebKit Reporter: zak ridouh <zakr>
Component: CMakeAssignee: zak ridouh <zakr>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

zak ridouh
Reported 2026-05-11 20:38:02 PDT
The CMake build of TestWebKitAPI on the Mac port does not produce the modern Cocoa WKWebProcessPlugIn bundle (TestWebKitAPI.wkbundle). The Xcode build has two separate InjectedBundle products: - InjectedBundleTestWebKitAPI.bundle (legacy C-API, for WKPage C-API tests) - TestWebKitAPI.wkbundle (modern Cocoa plug-in bundle) Only the former is built by CMake. The latter is loaded at runtime by Tools/TestWebKitAPI/Helpers/cocoa/WKWebViewConfigurationExtras.mm:44 [processPoolConfiguration setInjectedBundleURL: [[NSBundle mainBundle] URLForResource:@"TestWebKitAPI" withExtension:@"wkbundle"]]; from the +_test_configurationWithTestPlugInClassName: helper. Because the bundle isn't present next to the test executable, any test that uses this helper silently loses its WebProcess plug-in. Among the affected tests are every SiteIsolation.* case that calls into WebProcessPlugInWithInternals (SiteIsolation.mm:4701, :5189), every InAppBrowserPrivacy.* case, and numerous others. The Xcode build product is a bundle with the following contents: PRODUCT_NAME = TestWebKitAPI WRAPPER_EXTENSION = wkbundle PRODUCT_BUNDLE_IDENTIFIER = com.apple.TestWebKitAPI INFOPLIST_FILE = InjectedBundle/cocoa/WebProcessPlugIn/Info.plist (with NSPrincipalClass = WebProcessPlugIn) SOURCES = InjectedBundle/cocoa/WebProcessPlugIn/ WebProcessPlugIn.mm, WebProcessPlugInWithInternals.mm OTHER_LDFLAGS = -framework JavaScriptCore -framework WebKit -lWebCoreTestSupport PlatformMac.cmake should add an equivalent MODULE library target that emits TestWebKitAPI.wkbundle next to the TestWebKitAPI executable, with TestWebKit taking a build-time dependency on it so it's staged before test runs.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-05-11 20:38:09 PDT
zak ridouh
Comment 2 2026-05-11 21:22:34 PDT
EWS
Comment 3 2026-05-11 22:09:20 PDT
Committed 313060@main (d7f902d58473): <https://commits.webkit.org/313060@main> Reviewed commits have been landed. Closing PR #64730 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.