Skip to content

Commit 6f47a22

Browse files
Peter Birk PakkenbergChromium LUCI CQ
Peter Birk Pakkenberg
authored and
Chromium LUCI CQ
committed
[wei] Ensure Origin Trial enables full feature
This CL moves the base::Feature from content_features.h to a generated feature from runtime_enabled_features.json5. This means that the base::Feature can be default-enabled while the web API is controlled by the RuntimeFeature, which will still be default-disabled. An origin trial can enable the RuntimeFeature, which will allow full access to the API, provided the base::Feature is also enabled (see change to origin_trial_context.cc). Meanwhile, the base::Feature can be disabled through Finch as a kill-switch for the whole feature, and prevent origin trials from turning the feature on. Tests have been added to WebView test, as it allowed for easy spoofing of responses on a known origin. Bug: 1439945 Change-Id: Ifa0f5d4f5e0a0bf882dd1b0207698dddd6f71420 Fixed: b/278701736 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4681552 Reviewed-by: Rayan Kanso <rayankans@chromium.org> Commit-Queue: Peter Pakkenberg <pbirk@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Richard Coles <torne@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/main@{#1173344}
1 parent 05e71c3 commit 6f47a22

File tree

15 files changed

+173
-18
lines changed

15 files changed

+173
-18
lines changed

android_webview/browser/DEPS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ include_rules = [
104104

105105
"+third_party/blink/public/common/client_hints/enabled_client_hints.h",
106106
"+third_party/blink/public/common/features.h",
107+
"+third_party/blink/public/common/features_generated.h",
107108
"+third_party/blink/public/common/origin_trials/origin_trial_feature.h",
108109
"+third_party/blink/public/common/origin_trials/origin_trials_settings_provider.h",
109110
"+third_party/blink/public/common/origin_trials/trial_token_validator.h",

android_webview/browser/aw_content_browser_client_receiver_bindings.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "android_webview/browser/aw_print_manager.h"
99
#include "android_webview/browser/renderer_host/aw_render_view_host_ext.h"
1010
#include "android_webview/browser/safe_browsing/aw_url_checker_delegate_impl.h"
11+
#include "base/feature_list.h"
1112
#include "components/autofill/content/browser/content_autofill_driver_factory.h"
1213
#include "components/cdm/browser/media_drm_storage_impl.h"
1314
#include "components/content_capture/browser/onscreen_content_provider.h"
@@ -29,6 +30,7 @@
2930
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
3031
#include "services/service_manager/public/cpp/binder_registry.h"
3132
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
33+
#include "third_party/blink/public/common/features_generated.h"
3234
#include "third_party/blink/public/mojom/environment_integrity/environment_integrity_service.mojom.h"
3335

3436
#if BUILDFLAG(ENABLE_SPELLCHECK)
@@ -215,7 +217,7 @@ void AwContentBrowserClient::RegisterBrowserInterfaceBindersForFrame(
215217
map->Add<network_hints::mojom::NetworkHintsHandler>(
216218
base::BindRepeating(&BindNetworkHintsHandler));
217219

218-
if (base::FeatureList::IsEnabled(features::kWebEnvironmentIntegrity)) {
220+
if (base::FeatureList::IsEnabled(blink::features::kWebEnvironmentIntegrity)) {
219221
map->Add<blink::mojom::EnvironmentIntegrityService>(base::BindRepeating(
220222
&environment_integrity::AndroidEnvironmentIntegrityService::Create));
221223
}

android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ private ProductionSupportedFlagList() {}
472472
+ "Only onNetwork(Connected|Disconnected|SoonToDisconnect|MadeDefault) signals are propagated."),
473473
Flag.baseFeature(BlinkFeatures.REMOVE_NON_STANDARD_APPEARANCE_VALUE,
474474
"Remove non-standard CSS appearance values."),
475-
Flag.baseFeature(ContentFeatures.WEB_ENVIRONMENT_INTEGRITY,
475+
Flag.baseFeature(BlinkFeatures.WEB_ENVIRONMENT_INTEGRITY,
476476
"Enables Web Environment Integrity APIs. "
477477
+ "See https://chromestatus.com/feature/5796524191121408."),
478478
// Add new commandline switches and features above. The final entry should have a

android_webview/javatests/DEPS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ include_rules = [
44
"+components/background_task_scheduler/android/java",
55
"+components/component_updater/android/java",
66
"+components/embedder_support/android/metrics/java",
7+
"+components/environment_integrity/android/java",
78
"+components/minidump_uploader/android/java",
89
"+components/minidump_uploader/android/javatests",
910
"+components/policy/android/java",

android_webview/javatests/src/org/chromium/android_webview/test/AwWebEnvironmentIntegrityTest.java

Lines changed: 144 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44

55
package org.chromium.android_webview.test;
66

7+
import android.webkit.JavascriptInterface;
8+
79
import androidx.test.filters.SmallTest;
810

11+
import com.google.common.util.concurrent.Futures;
12+
import com.google.common.util.concurrent.ListenableFuture;
13+
914
import org.junit.After;
1015
import org.junit.Assert;
1116
import org.junit.Before;
@@ -14,12 +19,22 @@
1419
import org.junit.runner.RunWith;
1520

1621
import org.chromium.android_webview.AwContents;
22+
import org.chromium.android_webview.test.TestAwContentsClient.ShouldInterceptRequestHelper;
1723
import org.chromium.base.test.util.Batch;
24+
import org.chromium.base.test.util.CallbackHelper;
1825
import org.chromium.base.test.util.CommandLineFlags;
19-
import org.chromium.content_public.common.ContentFeatures;
26+
import org.chromium.blink_public.common.BlinkFeatures;
27+
import org.chromium.components.embedder_support.util.WebResourceResponseInfo;
28+
import org.chromium.components.environment_integrity.IntegrityServiceBridge;
29+
import org.chromium.components.environment_integrity.IntegrityServiceBridgeDelegate;
2030
import org.chromium.net.test.util.TestWebServer;
2131

32+
import java.io.ByteArrayInputStream;
33+
import java.nio.charset.StandardCharsets;
2234
import java.util.Collections;
35+
import java.util.Map;
36+
import java.util.concurrent.TimeUnit;
37+
import java.util.concurrent.TimeoutException;
2338

2439
/**
2540
* Tests for WebEnvironmentIntegrity in WebView.
@@ -29,7 +44,6 @@
2944
* and only supposed to test WebView-specific differences.
3045
*/
3146
@RunWith(AwJUnit4ClassRunner.class)
32-
@CommandLineFlags.Add({"enable-features=" + ContentFeatures.WEB_ENVIRONMENT_INTEGRITY})
3347
@Batch(Batch.PER_CLASS)
3448
public class AwWebEnvironmentIntegrityTest {
3549
@Rule
@@ -39,6 +53,17 @@ public class AwWebEnvironmentIntegrityTest {
3953
private AwContents mAwContents;
4054

4155
private TestWebServer mWebServer;
56+
private static final String ORIGIN_TRIAL_URL = "https://example.com/";
57+
private static final String ORIGIN_TRIAL_HEADER = "Origin-Trial";
58+
private static final String ORIGIN_TRIAL_TOKEN =
59+
"A1GBGCeaLBRlky1ITf9uRak5iluqLWnUdSTKVTO0Ce/I7a35nik6DKqPJNZSPd9KEAIuJKmi2dmL9HWThDWgdA"
60+
+ "cAAABheyJvcmlnaW4iOiAiaHR0cHM6Ly9leGFtcGxlLmNvbTo0NDMiLCAiZmVhdHVyZSI6ICJXZWJFbnZpcm"
61+
+ "9ubWVudEludGVncml0eSIsICJleHBpcnkiOiAyMDAwMDAwMDAwfQ==";
62+
63+
private static final long HANDLE = 123456789L;
64+
65+
private static final byte[] TOKEN = {1, 2, 3, 4};
66+
private static final String TOKEN_BASE64 = "AQIDBA==";
4267

4368
@Before
4469
public void setUp() throws Exception {
@@ -58,6 +83,24 @@ public void tearDown() throws Exception {
5883

5984
@Test
6085
@SmallTest
86+
public void testWebEnvironmentIntegrityApiNotAvailableByDefault() throws Throwable {
87+
// Load a web page from localhost to get a secure context
88+
mWebServer.setResponse("/", "<html>", Collections.emptyList());
89+
mActivityTestRule.loadUrlSync(
90+
mAwContents, mContentsClient.getOnPageFinishedHelper(), mWebServer.getBaseUrl());
91+
// Check that the 'getEnvironmentIntegrity' method is available.
92+
final String script = "'getEnvironmentIntegrity' in navigator ? 'available': 'missing'";
93+
String result = mActivityTestRule.executeJavaScriptAndWaitForResult(
94+
mAwContents, mContentsClient, script);
95+
// The result is expected to have extra quotes as a JSON-encoded string.
96+
Assert.assertEquals("This test is expected to fail if runtime_enabled_features.json5"
97+
+ " is updated to mark the feature as 'stable'.",
98+
"\"missing\"", result);
99+
}
100+
101+
@Test
102+
@SmallTest
103+
@CommandLineFlags.Add({"enable-features=" + BlinkFeatures.WEB_ENVIRONMENT_INTEGRITY})
61104
public void testWebEnvironmentIntegrityApiAvailable() throws Throwable {
62105
// Load a web page from localhost to get a secure context
63106
mWebServer.setResponse("/", "<html>", Collections.emptyList());
@@ -70,4 +113,103 @@ public void testWebEnvironmentIntegrityApiAvailable() throws Throwable {
70113
// The result is expected to have extra quotes as a JSON-encoded string.
71114
Assert.assertEquals("\"available\"", result);
72115
}
116+
117+
@Test
118+
@SmallTest
119+
@CommandLineFlags.Add({"disable-features=" + BlinkFeatures.WEB_ENVIRONMENT_INTEGRITY})
120+
public void testWebEnvironmentIntegrityApiCanBeDisabled() throws Throwable {
121+
// Load a web page from localhost to get a secure context
122+
mWebServer.setResponse("/", "<html>", Collections.emptyList());
123+
mActivityTestRule.loadUrlSync(
124+
mAwContents, mContentsClient.getOnPageFinishedHelper(), mWebServer.getBaseUrl());
125+
// Check that the 'getEnvironmentIntegrity' method is available.
126+
final String script = "'getEnvironmentIntegrity' in navigator ? 'available': 'missing'";
127+
String result = mActivityTestRule.executeJavaScriptAndWaitForResult(
128+
mAwContents, mContentsClient, script);
129+
// The result is expected to have extra quotes as a JSON-encoded string.
130+
Assert.assertEquals("\"missing\"", result);
131+
}
132+
133+
@Test
134+
@SmallTest
135+
@CommandLineFlags.Add({"origin-trial-public-key=dRCs+TocuKkocNKa0AtZ4awrt9XKH2SQCI6o4FY6BNA="})
136+
public void testAppIdentityEnabledByOriginTrial() throws Throwable {
137+
// Set up a response with the origin trial header.
138+
// Since origin trial tokens are tied to the origin, we use an request intercept to load
139+
// the content when making a request to the origin trial URL, instead of relying on the
140+
// server, which serves from an unknown port.
141+
var body = new ByteArrayInputStream(
142+
"<!DOCTYPE html><html><body>Hello, World".getBytes(StandardCharsets.UTF_8));
143+
var responseInfo = new WebResourceResponseInfo("text/html", "utf-8", body, 200, "OK",
144+
Map.of(ORIGIN_TRIAL_HEADER, ORIGIN_TRIAL_TOKEN));
145+
146+
final ShouldInterceptRequestHelper requestInterceptHelper =
147+
mContentsClient.getShouldInterceptRequestHelper();
148+
requestInterceptHelper.setReturnValueForUrl(ORIGIN_TRIAL_URL, responseInfo);
149+
150+
final TestIntegrityServiceBridgeDelegateImpl delegateForTesting =
151+
new TestIntegrityServiceBridgeDelegateImpl();
152+
mActivityTestRule.runOnUiThread(
153+
() -> IntegrityServiceBridge.setDelegateForTesting(delegateForTesting));
154+
155+
final ExecutionCallbackListener listener = new ExecutionCallbackListener();
156+
AwActivityTestRule.addJavascriptInterfaceOnUiThread(mAwContents, listener, "testListener");
157+
158+
mActivityTestRule.loadUrlSync(
159+
mAwContents, mContentsClient.getOnPageFinishedHelper(), ORIGIN_TRIAL_URL);
160+
161+
final String script = "(() => {"
162+
+ "if ('getEnvironmentIntegrity' in navigator) {"
163+
+ " navigator.getEnvironmentIntegrity('contentBinding')"
164+
+ " .then(s => testListener.result(s.encode()))"
165+
+ " .catch(e => testListener.result('error: ' + e));"
166+
+ " return 'available';"
167+
+ "} else {return 'unavailable';}"
168+
+ "})();";
169+
String scriptResult = mActivityTestRule.executeJavaScriptAndWaitForResult(
170+
mAwContents, mContentsClient, script);
171+
// The result is expected to have extra quotes as a JSON-encoded string.
172+
Assert.assertEquals("\"available\"", scriptResult);
173+
174+
// Wait until the result callback has been triggered, to inspect the state of the delegate
175+
// The actual result should just be an error we don't care about.
176+
String result = listener.waitForResult();
177+
Assert.assertEquals(TOKEN_BASE64, result);
178+
}
179+
180+
static class ExecutionCallbackListener {
181+
private final CallbackHelper mCallbackHelper = new CallbackHelper();
182+
private String mResult;
183+
184+
@JavascriptInterface
185+
public void result(String s) {
186+
mResult = s;
187+
mCallbackHelper.notifyCalled();
188+
}
189+
190+
String waitForResult() throws TimeoutException {
191+
mCallbackHelper.waitForNext(5, TimeUnit.SECONDS);
192+
return mResult;
193+
}
194+
}
195+
196+
private static class TestIntegrityServiceBridgeDelegateImpl
197+
implements IntegrityServiceBridgeDelegate {
198+
@Override
199+
public ListenableFuture<Long> createEnvironmentIntegrityHandle(
200+
boolean bindAppIdentity, int timeoutMilliseconds) {
201+
return Futures.immediateFuture(HANDLE);
202+
}
203+
204+
@Override
205+
public ListenableFuture<byte[]> getEnvironmentIntegrityToken(
206+
long handle, byte[] requestHash, int timeoutMilliseconds) {
207+
return Futures.immediateFuture(TOKEN);
208+
}
209+
210+
@Override
211+
public boolean canUseGms() {
212+
return true;
213+
}
214+
}
73215
}

android_webview/test/BUILD.gn

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ instrumentation_test_apk("webview_instrumentation_test_apk") {
279279
"//components/embedder_support/android:util_java",
280280
"//components/embedder_support/android:web_contents_delegate_java",
281281
"//components/embedder_support/android/metrics:java",
282+
"//components/environment_integrity/android:java",
282283
"//components/heap_profiling/multi_process:heap_profiling_java_test_support",
283284
"//components/metrics:metrics_java",
284285
"//components/minidump_uploader:minidump_uploader_java",
@@ -314,6 +315,7 @@ instrumentation_test_apk("webview_instrumentation_test_apk") {
314315
"//third_party/androidx:androidx_test_runner_java",
315316
"//third_party/androidx_javascriptengine:javascriptengine_common_java",
316317
"//third_party/androidx_javascriptengine:javascriptengine_java",
318+
"//third_party/blink/public/common:common_java",
317319
"//third_party/blink/public/mojom:mojom_platform_java",
318320
"//third_party/blink/public/mojom:web_feature_mojo_bindings_java",
319321
"//third_party/hamcrest:hamcrest_core_java",

chrome/browser/chrome_browser_interface_binders.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
103103
#include "services/image_annotation/public/mojom/image_annotation.mojom.h"
104104
#include "third_party/blink/public/common/features.h"
105+
#include "third_party/blink/public/common/features_generated.h"
105106
#include "third_party/blink/public/mojom/credentialmanagement/credential_manager.mojom.h"
106107
#include "third_party/blink/public/mojom/lcp_critical_path_predictor/lcp_critical_path_predictor.mojom.h"
107108
#include "third_party/blink/public/mojom/loader/navigation_predictor.mojom.h"
@@ -880,7 +881,7 @@ void PopulateChromeFrameBinders(
880881
}
881882
map->Add<blink::mojom::ShareService>(base::BindRepeating(
882883
&ForwardToJavaWebContents<blink::mojom::ShareService>));
883-
if (base::FeatureList::IsEnabled(features::kWebEnvironmentIntegrity)) {
884+
if (base::FeatureList::IsEnabled(blink::features::kWebEnvironmentIntegrity)) {
884885
map->Add<blink::mojom::EnvironmentIntegrityService>(base::BindRepeating(
885886
&environment_integrity::AndroidEnvironmentIntegrityService::Create));
886887
}

components/environment_integrity/android/android_environment_integrity_service.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "mojo/public/cpp/bindings/callback_helpers.h"
1717
#include "mojo/public/cpp/bindings/message.h"
1818
#include "mojo/public/cpp/bindings/pending_receiver.h"
19+
#include "third_party/blink/public/common/features_generated.h"
1920
#include "url/origin.h"
2021

2122
namespace environment_integrity {
@@ -82,12 +83,12 @@ AndroidEnvironmentIntegrityService::GetDataManager() {
8283
void AndroidEnvironmentIntegrityService::GetEnvironmentIntegrity(
8384
const std::vector<uint8_t>& content_binding,
8485
GetEnvironmentIntegrityCallback callback) {
85-
if (!base::FeatureList::IsEnabled(features::kWebEnvironmentIntegrity)) {
86+
if (!base::FeatureList::IsEnabled(
87+
blink::features::kWebEnvironmentIntegrity)) {
8688
ReportBadMessageAndDeleteThis(
8789
"Feature not enabled. IPC call not expected.");
8890
return;
8991
}
90-
9192
if (!integrity_service_->IsIntegrityAvailable()) {
9293
std::move(callback).Run(EnvironmentIntegrityResponseCode::kInternalError,
9394
std::vector<uint8_t>());

components/environment_integrity/android/android_environment_integrity_service_unittest.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "content/public/test/test_renderer_host.h"
2323
#include "content/public/test/web_contents_tester.h"
2424
#include "testing/gtest/include/gtest/gtest.h"
25+
#include "third_party/blink/public/common/features_generated.h"
2526
#include "third_party/blink/public/mojom/environment_integrity/environment_integrity_service.mojom.h"
2627

2728
namespace environment_integrity {
@@ -109,7 +110,8 @@ class AndroidEnvironmentIntegrityServiceTest
109110
public:
110111
void SetUp() override {
111112
BaseAndroidEnvironmentIntegrityServiceTest::SetUp();
112-
feature_list_.InitAndEnableFeature(features::kWebEnvironmentIntegrity);
113+
feature_list_.InitAndEnableFeature(
114+
blink::features::kWebEnvironmentIntegrity);
113115
}
114116
};
115117

@@ -467,7 +469,8 @@ class AndroidEnvironmentIntegrityServiceDisabledFeatureTest
467469
public:
468470
void SetUp() override {
469471
BaseAndroidEnvironmentIntegrityServiceTest::SetUp();
470-
feature_list_.InitAndDisableFeature(features::kWebEnvironmentIntegrity);
472+
feature_list_.InitAndDisableFeature(
473+
blink::features::kWebEnvironmentIntegrity);
471474
}
472475
};
473476

content/browser/browser_interface_binders.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ void PopulateBinderMapWithContext(
11391139
map->Add<blink::mojom::BrowsingTopicsDocumentService>(
11401140
base::BindRepeating(&BrowsingTopicsDocumentHost::CreateMojoService));
11411141
}
1142-
if (base::FeatureList::IsEnabled(features::kWebEnvironmentIntegrity)) {
1142+
if (base::FeatureList::IsEnabled(blink::features::kWebEnvironmentIntegrity)) {
11431143
map->Add<blink::mojom::EnvironmentIntegrityService>(base::BindRepeating(
11441144
&EmptyBinderForFrame<blink::mojom::EnvironmentIntegrityService>));
11451145
}

content/child/runtime_features.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,6 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
392392
{"WebAppTabStrip", raw_ref(features::kDesktopPWAsTabStrip)},
393393
{"WebAppTabStripCustomizations",
394394
raw_ref(blink::features::kDesktopPWAsTabStripCustomizations)},
395-
{"WebEnvironmentIntegrity", raw_ref(features::kWebEnvironmentIntegrity)},
396395
{"WebSerialBluetooth",
397396
raw_ref(features::kEnableBluetoothSerialPortProfileInSerialApi)},
398397
{"WGIGamepadTriggerRumble",

content/public/common/content_features.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,11 +1418,6 @@ BASE_FEATURE(kWebBluetoothNewPermissionsBackend,
14181418
"WebBluetoothNewPermissionsBackend",
14191419
base::FEATURE_DISABLED_BY_DEFAULT);
14201420

1421-
// Enables the Web Environment Integrity API.
1422-
BASE_FEATURE(kWebEnvironmentIntegrity,
1423-
"WebEnvironmentIntegrity",
1424-
base::FEATURE_DISABLED_BY_DEFAULT);
1425-
14261421
// If WebGL Image Chromium is allowed, this feature controls whether it is
14271422
// enabled.
14281423
BASE_FEATURE(kWebGLImageChromium,

content/public/common/content_features.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyTrapHandler);
318318
CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebAuthnTouchToFillCredentialSelection);
319319
CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebBluetooth);
320320
CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebBluetoothNewPermissionsBackend);
321-
CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebEnvironmentIntegrity);
322321
CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebGLImageChromium);
323322
CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebMidi);
324323
CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebOtpBackendAuto);

third_party/blink/renderer/core/origin_trials/origin_trial_context.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,10 @@ bool OriginTrialContext::CanEnableTrialFromName(const StringView& trial_name) {
548548
return base::FeatureList::IsEnabled(features::kComputePressure);
549549
}
550550

551+
if (trial_name == "WebEnvironmentIntegrity") {
552+
return base::FeatureList::IsEnabled(features::kWebEnvironmentIntegrity);
553+
}
554+
551555
return true;
552556
}
553557

third_party/blink/renderer/platform/runtime_enabled_features.json5

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3906,8 +3906,13 @@
39063906
{
39073907
name: "WebEnvironmentIntegrity",
39083908
status: "experimental",
3909-
base_feature: "none",
39103909
origin_trial_feature_name: "WebEnvironmentIntegrity",
3910+
// base_feature is meant as kill-switch. The RuntimeFeature should follow
3911+
// the `status` field or Origin Trial unless explicitly overriden by
3912+
// Finch / command line flags.
3913+
base_feature_status: "enabled",
3914+
copied_from_base_feature_if: "overridden",
3915+
origin_trial_allows_third_party: true,
39113916
},
39123917
{
39133918
name: "WebFontResizeLCP",

0 commit comments

Comments
 (0)