Commit b6f48f5b authored by Mustafa Emre Acer's avatar Mustafa Emre Acer Committed by Commit Bot

Update field trial config for SafeBrowsing delayed warnings

This CL enables SafeBrowsingDelayedWarnings feature in tests by default.
It also disables the feature on a few tests on Android. The reason for
this is that the feature has good test coverage on desktop, and writing
new tests for Android will be a significant time investment.

Bug: 1077426
Change-Id: Ia5b04dc74893d513a13a72bc92ad1f1537b6691e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2327550Reviewed-by: default avatarPeter Conn <peconn@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795071}
parent 3a13d26e
...@@ -16,10 +16,12 @@ import org.junit.Test; ...@@ -16,10 +16,12 @@ import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.flags.ChromeSwitches;
import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.test.ChromeActivityTestRule; import org.chromium.chrome.test.ChromeActivityTestRule;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.chrome.test.util.browser.Features;
import org.chromium.components.safe_browsing.SafeBrowsingApiBridge; import org.chromium.components.safe_browsing.SafeBrowsingApiBridge;
import org.chromium.content_public.browser.LoadUrlParams; import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.WebContents;
...@@ -34,6 +36,7 @@ import org.chromium.ui.base.PageTransition; ...@@ -34,6 +36,7 @@ import org.chromium.ui.base.PageTransition;
*/ */
@RunWith(ChromeJUnit4ClassRunner.class) @RunWith(ChromeJUnit4ClassRunner.class)
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE})
@Features.DisableFeatures({ChromeFeatureList.SAFE_BROWSING_DELAYED_WARNINGS})
public final class SafeBrowsingTest { public final class SafeBrowsingTest {
@Rule @Rule
public ChromeActivityTestRule<ChromeActivity> mActivityTestRule = public ChromeActivityTestRule<ChromeActivity> mActivityTestRule =
......
...@@ -318,8 +318,11 @@ public class DetachedResourceRequestTest { ...@@ -318,8 +318,11 @@ public class DetachedResourceRequestTest {
*/ */
@Test @Test
@SmallTest @SmallTest
@DisableFeatures(ChromeFeatureList.SPLIT_CACHE_BY_NETWORK_ISOLATION_KEY) @DisableFeatures({ChromeFeatureList.SPLIT_CACHE_BY_NETWORK_ISOLATION_KEY,
public void testSafeBrowsingMainResource() throws Exception { ChromeFeatureList.SAFE_BROWSING_DELAYED_WARNINGS})
public void
testSafeBrowsingMainResource() throws Exception {
testSafeBrowsingMainResource(true /* afterNative */, false /* splitCacheEnabled */); testSafeBrowsingMainResource(true /* afterNative */, false /* splitCacheEnabled */);
} }
...@@ -330,6 +333,7 @@ public class DetachedResourceRequestTest { ...@@ -330,6 +333,7 @@ public class DetachedResourceRequestTest {
@Test @Test
@SmallTest @SmallTest
@EnableFeatures(ChromeFeatureList.SPLIT_CACHE_BY_NETWORK_ISOLATION_KEY) @EnableFeatures(ChromeFeatureList.SPLIT_CACHE_BY_NETWORK_ISOLATION_KEY)
@DisableFeatures(ChromeFeatureList.SAFE_BROWSING_DELAYED_WARNINGS)
public void testSafeBrowsingMainResourceWithSplitCache() throws Exception { public void testSafeBrowsingMainResourceWithSplitCache() throws Exception {
testSafeBrowsingMainResource(true /* afterNative */, true /* splitCacheEnabled */); testSafeBrowsingMainResource(true /* afterNative */, true /* splitCacheEnabled */);
} }
...@@ -340,6 +344,7 @@ public class DetachedResourceRequestTest { ...@@ -340,6 +344,7 @@ public class DetachedResourceRequestTest {
*/ */
@Test @Test
@SmallTest @SmallTest
@DisableFeatures({ChromeFeatureList.SAFE_BROWSING_DELAYED_WARNINGS})
public void testSafeBrowsingSubresource() throws Exception { public void testSafeBrowsingSubresource() throws Exception {
testSafeBrowsingSubresource(true); testSafeBrowsingSubresource(true);
} }
...@@ -350,8 +355,10 @@ public class DetachedResourceRequestTest { ...@@ -350,8 +355,10 @@ public class DetachedResourceRequestTest {
*/ */
@Test @Test
@SmallTest @SmallTest
@DisableFeatures(ChromeFeatureList.SPLIT_CACHE_BY_NETWORK_ISOLATION_KEY) @DisableFeatures({ChromeFeatureList.SPLIT_CACHE_BY_NETWORK_ISOLATION_KEY,
public void testSafeBrowsingMainResourceBeforeNative() throws Exception { ChromeFeatureList.SAFE_BROWSING_DELAYED_WARNINGS})
public void
testSafeBrowsingMainResourceBeforeNative() throws Exception {
testSafeBrowsingMainResource(false /* afterNative */, false /* splitCacheEnabled */); testSafeBrowsingMainResource(false /* afterNative */, false /* splitCacheEnabled */);
} }
...@@ -361,6 +368,7 @@ public class DetachedResourceRequestTest { ...@@ -361,6 +368,7 @@ public class DetachedResourceRequestTest {
*/ */
@Test @Test
@SmallTest @SmallTest
@Features.DisableFeatures({ChromeFeatureList.SAFE_BROWSING_DELAYED_WARNINGS})
public void testSafeBrowsingSubresourceBeforeNative() throws Exception { public void testSafeBrowsingSubresourceBeforeNative() throws Exception {
testSafeBrowsingSubresource(false); testSafeBrowsingSubresource(false);
} }
......
...@@ -384,6 +384,7 @@ public abstract class ChromeFeatureList { ...@@ -384,6 +384,7 @@ public abstract class ChromeFeatureList {
public static final String REPORT_FEED_USER_ACTIONS = "ReportFeedUserActions"; public static final String REPORT_FEED_USER_ACTIONS = "ReportFeedUserActions";
public static final String REVAMPED_CONTEXT_MENU = "RevampedContextMenu"; public static final String REVAMPED_CONTEXT_MENU = "RevampedContextMenu";
public static final String SAFETY_CHECK_ANDROID = "SafetyCheckAndroid"; public static final String SAFETY_CHECK_ANDROID = "SafetyCheckAndroid";
public static final String SAFE_BROWSING_DELAYED_WARNINGS = "SafeBrowsingDelayedWarnings";
public static final String SAFE_BROWSING_ENHANCED_PROTECTION_ENABLED = public static final String SAFE_BROWSING_ENHANCED_PROTECTION_ENABLED =
"SafeBrowsingEnhancedProtection"; "SafeBrowsingEnhancedProtection";
public static final String SAFE_BROWSING_SECURITY_SECTION_UI = public static final String SAFE_BROWSING_SECURITY_SECTION_UI =
......
...@@ -6141,6 +6141,28 @@ ...@@ -6141,6 +6141,28 @@
] ]
} }
], ],
"SafeBrowsingDelayedWarnings": [
{
"platforms": [
"android",
"chromeos",
"linux",
"mac",
"windows"
],
"experiments": [
{
"name": "Enabled",
"params": {
"mouse": "true"
},
"enable_features": [
"SafeBrowsingDelayedWarnings"
]
}
]
}
],
"SafeBrowsingPasswordProtectionForSavedPasswords": [ "SafeBrowsingPasswordProtectionForSavedPasswords": [
{ {
"platforms": [ "platforms": [
......
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