Bug 315075

Summary: [CMake] Add argv-translation shim for TestWebKitAPI 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-18 21:24:45 PDT
generic/main.cpp hands argv straight to gtest, so the Swift-runner-equivalent flags that run-api-tests emits — --filter, --list-tests, --site-isolation, --force, --remote-layer-tree, etc. — silently no-op under the CMake build. Add generic/main.mm as the Apple-port entrypoint, mirroring Runner/{TestWebKitAPI,GoogleTestsController}.swift: translates Swift-runner flags into --gtest_* equivalents, invokes +[WKPreferences _forceSiteIsolationAlwaysOnForTesting] reflectively for --site-isolation, sets NSArgumentDomain bools for the layer-tree / GPU-process toggles, and applies the once-per-process setup (persistent-domain reset, NSApp instantiation, WTF::enableAllSDKAlignedBehaviors). Flip _test_main_SOURCES in PlatformMac.cmake to the new file. Non-Apple ports (GTK/WPE/Win) keep generic/main.cpp.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-05-18 21:24:51 PDT
zak ridouh
Comment 2 2026-05-18 21:30:46 PDT
EWS
Comment 3 2026-05-19 13:38:24 PDT
Committed 313517@main (6557c69a86eb): <https://commits.webkit.org/313517@main> Reviewed commits have been landed. Closing PR #65160 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.