Bug 233679 - Add WKWebsiteDataStore configuration option to enable Mock app bundle testing
Summary: Add WKWebsiteDataStore configuration option to enable Mock app bundle testing
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
Keywords: InRadar
Depends on:
Reported: 2021-11-30 20:58 PST by Brady Eidson
Modified: 2021-12-01 14:33 PST (History)
3 users (show)

See Also:

EWS v1 (38.82 KB, patch)
2021-11-30 21:14 PST, Brady Eidson
thorton: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing v1 (38.91 KB, patch)
2021-11-30 23:46 PST, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2021-11-30 20:58:51 PST
Add WKWebsiteDataStore configuration option to enable Mock app bundle testing

As we add the real bundles to the platforms, will be useful to switch between explicitly enabling/disabling the mock one.
Comment 1 Brady Eidson 2021-11-30 21:14:02 PST
Created attachment 445515 [details]
EWS v1
Comment 2 Tim Horton 2021-11-30 22:58:40 PST
Comment on attachment 445515 [details]
EWS v1

View in context: https://bugs.webkit.org/attachment.cgi?id=445515&action=review

> Source/WebKit/NetworkProcess/NetworkSession.h:131
> +    virtual bool webpushdUsesMockBundlesForTesting() const { return false; }

Can we not call it "webpushd" in the code? webPushDaemon below seems a *tad* better, though still maybe not perfect.

> Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h:90
> +    WebPushD::WebPushDaemonConnectionConfiguration webPushDaemonConnectionConfiguration;

Oh I see, you have ... already done it. Quite the name!

> Source/WebKit/Shared/WebPushDaemonConnectionConfiguration.h:62
> +        WTFMove(*useMockBundlesForTesting),
> +        WTFMove(*hostAppAuditTokenData)

These WTFMoves seem a bit unnecessary

> Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:89
> +@property (nonatomic) BOOL webpushdUsesMockBundlesForTesting WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

Oof, surely not in the SPI though, please?
Comment 3 Brady Eidson 2021-11-30 23:46:27 PST
Created attachment 445531 [details]
Patch for landing v1
Comment 4 Brady Eidson 2021-11-30 23:47:02 PST
For posterity:

The Apple Silicon build failures were due to the patch in https://bugs.webkit.org/show_bug.cgi?id=233567 running right before this one in the EWS queue, and were not caused by this patch.
Comment 5 EWS 2021-12-01 01:07:54 PST
Committed r286355 (244714@main): <https://commits.webkit.org/244714@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 445531 [details].
Comment 6 Radar WebKit Bug Importer 2021-12-01 01:08:25 PST