Commit 86ebe909 authored by Peter Beverloo's avatar Peter Beverloo Committed by Commit Bot

Have the two Background Fetch sub-features respect Experimental WP flag

Also change the variable's name from camelCase to hacker_style.

Change-Id: Ib8ef997fa0193b00874d880053a495d649a08175
Reviewed-on: https://chromium-review.googlesource.com/c/1371806
Commit-Queue: Peter Beverloo <peter@chromium.org>
Reviewed-by: default avatarMugdha Lakhani <nator@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615869}
parent 3872a4b4
......@@ -102,9 +102,9 @@ static void SetRuntimeFeatureDefaultsForPlatform() {
void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
const base::CommandLine& command_line) {
bool enableExperimentalWebPlatformFeatures = command_line.HasSwitch(
switches::kEnableExperimentalWebPlatformFeatures);
if (enableExperimentalWebPlatformFeatures)
bool enable_experimental_web_platform_features =
command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures);
if (enable_experimental_web_platform_features)
WebRuntimeFeatures::EnableExperimentalFeatures(true);
SetRuntimeFeatureDefaultsForPlatform();
......@@ -216,7 +216,7 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
WebRuntimeFeatures::EnablePrintBrowser(true);
if (command_line.HasSwitch(switches::kEnableNetworkInformationDownlinkMax) ||
enableExperimentalWebPlatformFeatures) {
enable_experimental_web_platform_features) {
WebRuntimeFeatures::EnableNetInfoDownlinkMax(true);
}
......@@ -254,7 +254,7 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
WebRuntimeFeatures::EnableSecMetadata(
base::FeatureList::IsEnabled(features::kSecMetadata) ||
enableExperimentalWebPlatformFeatures);
enable_experimental_web_platform_features);
WebRuntimeFeatures::EnableUserActivationV2(
base::FeatureList::IsEnabled(features::kUserActivationV2));
......@@ -373,7 +373,7 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
WebRuntimeFeatures::EnableWebAuthGetTransports(
base::FeatureList::IsEnabled(features::kWebAuthGetTransports) ||
enableExperimentalWebPlatformFeatures);
enable_experimental_web_platform_features);
WebRuntimeFeatures::EnableClientPlaceholdersForServerLoFi(
base::GetFieldTrialParamValue("PreviewsClientLoFi",
......@@ -515,17 +515,19 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
WebRuntimeFeatures::EnableBackgroundFetchAccessActiveFetches(
base::FeatureList::IsEnabled(
features::kBackgroundFetchAccessActiveFetches));
features::kBackgroundFetchAccessActiveFetches) ||
enable_experimental_web_platform_features);
WebRuntimeFeatures::EnableBackgroundFetchUploads(
base::FeatureList::IsEnabled(features::kBackgroundFetchUploads));
base::FeatureList::IsEnabled(features::kBackgroundFetchUploads) ||
enable_experimental_web_platform_features);
WebRuntimeFeatures::EnableNoHoverAfterLayoutChange(
base::FeatureList::IsEnabled(features::kNoHoverAfterLayoutChange));
WebRuntimeFeatures::EnableJankTracking(
base::FeatureList::IsEnabled(blink::features::kJankTracking) ||
enableExperimentalWebPlatformFeatures);
enable_experimental_web_platform_features);
WebRuntimeFeatures::EnableFirstContentfulPaintPlusPlus(
base::FeatureList::IsEnabled(
......
This is a testharness.js-based test.
FAIL Fetch with an upload should work promise_test: Unhandled rejection with value: object "TypeError: Requests with a body are not yet supported. For updates check http://crbug.com/774054"
FAIL Fetch with an upload should work assert_equals: expected "Background Fetch!" but got ""
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment