Bug 313900
| Summary: | [WebKitLegacy] Eliminate WK_BUILD_FOR_TESTING by refactoring to Objective-C class method SPI | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
| Component: | WebKit Misc. | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 217960 | ||
| Bug Blocks: | |||
David Kilzer (:ddkilzer)
WebKitLegacy.framework uses the `WK_BUILD_FOR_TESTING` mechanism to conditionally export `TestWebPreferencesCacheModelForMainBundle()` for TestWebKitAPI. This is the only testing symbol exported from WebKitLegacy, and its sole consumer is the `WebKitLegacy.CacheModelForMainBundle` API test.
The mechanism prevents TestWebKitAPI from linking to WebKitLegacy.framework in Production builds because the testing symbol is not exported in the Production configuration.
It is also overly complex for one symbol, involving six coordinated pieces: the `WK_BUILD_FOR_TESTING` xcconfig variable, the `-DENABLE_BUILD_FOR_TESTING` compiler flag, the `#if ENABLE(BUILD_FOR_TESTING)` guard in `WebPreferences.mm`, the `-extra-private-header TestingFunctions.h` TAPI flag, the `WebKit.Testing.exp` export symbol list, and a conditional block in the "Generate Export Files" build phase script.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/176091724>
David Kilzer (:ddkilzer)
*** Bug 313841 has been marked as a duplicate of this bug. ***
David Kilzer (:ddkilzer)
Pull request: https://github.com/WebKit/WebKit/pull/64106
EWS
Committed 312551@main (029c5391653d): <https://commits.webkit.org/312551@main>
Reviewed commits have been landed. Closing PR #64106 and removing active labels.