Skip to content

Commit

Permalink
The status for the PushAPIEnabled flag should be 'embedder' rather th…
Browse files Browse the repository at this point in the history
…an 'testable'

https://bugs.webkit.org/show_bug.cgi?id=255794
<rdar://problem/108375647>

Reviewed by Ben Nham.

While reviewing feature flag state, we noticed that 'PushAPIEnabled' is testable (and
off-by-default). It should instead be an `embedder` flag.

We should continue to activate it during tests to maintain proper coverage.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Tools/DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
* Tools/WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):

Canonical link: https://commits.webkit.org/263267@main
  • Loading branch information
brentfulgham authored and Brent Fulgham committed Apr 21, 2023
1 parent 5c5b8c1 commit e07c0d8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
Expand Up @@ -5023,7 +5023,7 @@ PunchOutWhiteBackgroundsInDarkMode:

PushAPIEnabled:
type: bool
status: testable
status: embedder
category: dom
condition: ENABLE(SERVICE_WORKER)
humanReadableName: "Push API"
Expand Down
1 change: 1 addition & 0 deletions Tools/DumpRenderTree/TestOptions.cpp
Expand Up @@ -91,6 +91,7 @@ const TestFeatures& TestOptions::defaults()
{ "NeedsStorageAccessFromFileURLsQuirk", false },
{ "OfflineWebApplicationCacheEnabled", true },
{ "PaintTimingEnabled", true },
{ "PushAPIEnabled", true },
{ "ReferrerPolicyAttributeEnabled", true },
{ "RemotePlaybackEnabled", true },
{ "RequiresUserGestureForAudioPlayback", false },
Expand Down
Expand Up @@ -7946,6 +7946,7 @@ static void configureLockdownWKWebViewConfiguration(WKWebViewConfiguration *conf
[config.preferences _setMediaDevicesEnabled:YES];
config.preferences._mediaCaptureRequiresSecureConnection = NO;
[config.preferences _setNotificationsEnabled:YES];
[config.preferences _setPushAPIEnabled: YES];

// Turn on testable and preview features to confirm they are properly turned off in Lockdown Mode.
for (_WKFeature *feature in [WKPreferences _features]) {
Expand Down
1 change: 1 addition & 0 deletions Tools/WebKitTestRunner/TestOptions.cpp
Expand Up @@ -121,6 +121,7 @@ const TestFeatures& TestOptions::defaults()
{ "PageVisibilityBasedProcessSuppressionEnabled", false },
{ "PdfJSViewerEnabled", false },
{ "PluginsEnabled", true },
{ "PushAPIEnabled", true },
{ "RequiresUserGestureForAudioPlayback", false },
{ "RequiresUserGestureForMediaPlayback", false },
{ "RequiresUserGestureForVideoPlayback", false },
Expand Down

0 comments on commit e07c0d8

Please sign in to comment.