Bug 314604
| Summary: | [CMake] Build TestWebKitAPI.wkbundle on Mac | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | zak ridouh <zakr> |
| Component: | CMake | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/176847727>
zak ridouh
Pull request: https://github.com/WebKit/WebKit/pull/64730
EWS
Committed 313060@main (d7f902d58473): <https://commits.webkit.org/313060@main>
Reviewed commits have been landed. Closing PR #64730 and removing active labels.