Commit 2fb48e55 authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

Add DRP network service flag to tests that need it

This flag is necessary to enable DRP with network service. Adding the
flag to DRP tests allows them to pass when run with network service on
the Android mojo bot.

Also updates the changed files to use @EnableFeatures/@DisableFeatures.

Bug: 721403
Change-Id: Ibf75db48c4ab64ac47bd493e1a5e04f899ac19e9
Reviewed-on: https://chromium-review.googlesource.com/c/1352476Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612927}
parent cf50edbd
......@@ -39,6 +39,8 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.chrome.test.ChromeTabbedActivityTestRule;
import org.chromium.chrome.test.util.ApplicationTestUtils;
import org.chromium.chrome.test.util.ChromeTabUtils;
import org.chromium.chrome.test.util.browser.Features.DisableFeatures;
import org.chromium.chrome.test.util.browser.Features.EnableFeatures;
import org.chromium.content_public.browser.test.util.Criteria;
import org.chromium.content_public.browser.test.util.CriteriaHelper;
import org.chromium.content_public.browser.test.util.DOMUtils;
......@@ -783,9 +785,11 @@ public class TabsOpenedFromExternalAppTest {
*/
@Test
@MediumTest
@CommandLineFlags.
Add({"enable-spdy-proxy-auth", "enable-features=DataReductionProxyDecidesTransform"})
public void testLaunchWebLiteURL() throws InterruptedException {
@CommandLineFlags.Add("enable-spdy-proxy-auth")
@EnableFeatures(
{"DataReductionProxyDecidesTransform", "DataReductionProxyEnabledWithNetworkService"})
public void
testLaunchWebLiteURL() throws InterruptedException {
mActivityTestRule.startMainActivityFromLauncher();
String url = mTestServer.getURL("/chrome/test/data/android/about.html");
......@@ -804,8 +808,8 @@ public class TabsOpenedFromExternalAppTest {
*/
@Test
@MediumTest
@CommandLineFlags.
Add({"enable-spdy-proxy-auth", "disable-features=DataReductionProxyDecidesTransform"})
@CommandLineFlags.Add("enable-spdy-proxy-auth")
@DisableFeatures("DataReductionProxyDecidesTransform")
public void testLaunchWebLiteURLNoPreviews() throws InterruptedException {
mActivityTestRule.startMainActivityFromLauncher();
......
......@@ -24,6 +24,7 @@ import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
import org.chromium.chrome.test.ChromeActivityTestRule;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.chrome.test.util.browser.Features.EnableFeatures;
/**
* Tests the Data Saver AppMenu footer
......@@ -31,6 +32,7 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
@RunWith(ChromeJUnit4ClassRunner.class)
@RetryOnFailure
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE})
@EnableFeatures("DataReductionProxyEnabledWithNetworkService")
public class DataSaverAppMenuTest {
@Rule
public ChromeActivityTestRule<ChromeActivity> mActivityTestRule =
......
......@@ -818,7 +818,7 @@ public class CustomTabActivityTest {
*/
@Test
@SmallTest
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.MODAL_PERMISSION_PROMPTS)
@DisableFeatures(ChromeFeatureList.MODAL_PERMISSION_PROMPTS)
@RetryOnFailure
public void testTabReparentingInfoBar() throws InterruptedException {
LocationSettingsTestUtil.setSystemLocationSettingEnabled(true);
......@@ -2833,10 +2833,12 @@ public class CustomTabActivityTest {
*/
@Test
@SmallTest
@CommandLineFlags.
Add({"enable-spdy-proxy-auth", "enable-features=DataReductionProxyDecidesTransform"})
@CommandLineFlags.Add("enable-spdy-proxy-auth")
@EnableFeatures(
{"DataReductionProxyDecidesTransform", "DataReductionProxyEnabledWithNetworkService"})
@RetryOnFailure
public void testLaunchWebLiteURL() throws Exception {
public void
testLaunchWebLiteURL() throws Exception {
final String testUrl = WEBLITE_PREFIX + mTestPage;
mCustomTabActivityTestRule.startCustomTabActivityWithIntent(
CustomTabsTestUtils.createMinimalCustomTabIntent(
......@@ -2851,8 +2853,8 @@ public class CustomTabActivityTest {
*/
@Test
@SmallTest
@CommandLineFlags.
Add({"enable-spdy-proxy-auth", "disable-features=DataReductionProxyDecidesTransform"})
@CommandLineFlags.Add("enable-spdy-proxy-auth")
@DisableFeatures("DataReductionProxyDecidesTransform")
@RetryOnFailure
public void testLaunchWebLiteURLNoPreviews() throws Exception {
final String testUrl = WEBLITE_PREFIX + mTestPage;
......@@ -2869,7 +2871,7 @@ public class CustomTabActivityTest {
*/
@Test
@SmallTest
@CommandLineFlags.Add({"enable-features=DataReductionProxyDecidesTransform"})
@EnableFeatures("DataReductionProxyDecidesTransform")
@RetryOnFailure
public void testLaunchWebLiteURLNoDataReductionProxy() throws Exception {
final String testUrl = WEBLITE_PREFIX + mTestPage;
......@@ -2886,8 +2888,8 @@ public class CustomTabActivityTest {
*/
@Test
@SmallTest
@CommandLineFlags.
Add({"enable-spdy-proxy-auth", "enable-features=DataReductionProxyDecidesTransform"})
@CommandLineFlags.Add("enable-spdy-proxy-auth")
@EnableFeatures("DataReductionProxyDecidesTransform")
@RetryOnFailure
public void testLaunchHttpsWebLiteURL() throws Exception {
final String testUrl = WEBLITE_PREFIX + mTestPage.replaceFirst("http", "https");
......@@ -2904,8 +2906,8 @@ public class CustomTabActivityTest {
*/
@Test
@SmallTest
@CommandLineFlags.
Add({"enable-spdy-proxy-auth", "enable-features=DataReductionProxyDecidesTransform"})
@CommandLineFlags.Add("enable-spdy-proxy-auth")
@EnableFeatures("DataReductionProxyDecidesTransform")
@RetryOnFailure
public void testLaunchNonWebLiteURL() throws Exception {
final String testUrl = mTestPage2 + "/?lite_url=" + mTestPage;
......
......@@ -38,6 +38,8 @@ import org.chromium.chrome.test.ChromeActivityTestRule;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.chrome.test.util.InfoBarTestAnimationListener;
import org.chromium.chrome.test.util.InfoBarUtil;
import org.chromium.chrome.test.util.browser.Features.DisableFeatures;
import org.chromium.chrome.test.util.browser.Features.EnableFeatures;
import org.chromium.chrome.test.util.browser.LocationSettingsTestUtil;
import org.chromium.content_public.browser.WebContents;
import org.chromium.content_public.browser.test.util.Criteria;
......@@ -255,7 +257,7 @@ public class InfoBarTest {
*/
@Test
@MediumTest
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.MODAL_PERMISSION_PROMPTS)
@DisableFeatures(ChromeFeatureList.MODAL_PERMISSION_PROMPTS)
@Feature({"Browser", "Main"})
@RetryOnFailure
public void testInfoBarForGeolocation() throws InterruptedException, TimeoutException {
......@@ -281,7 +283,7 @@ public class InfoBarTest {
*/
@Test
@MediumTest
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.MODAL_PERMISSION_PROMPTS)
@DisableFeatures(ChromeFeatureList.MODAL_PERMISSION_PROMPTS)
@Feature({"Browser"})
@RetryOnFailure
public void testInfoBarForGeolocationDisappearsOnBack()
......@@ -311,6 +313,7 @@ public class InfoBarTest {
@Test
@MediumTest
@CommandLineFlags.Add("force-fieldtrials=DataCompressionProxyPromoVisibility/Enabled")
@EnableFeatures("DataReductionProxyEnabledWithNetworkService")
@Feature({"Browser", "Main"})
@RetryOnFailure
public void testDataReductionPromoInfoBar() {
......@@ -600,7 +603,7 @@ public class InfoBarTest {
*/
@Test
@MediumTest
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.MODAL_PERMISSION_PROMPTS)
@DisableFeatures(ChromeFeatureList.MODAL_PERMISSION_PROMPTS)
@Feature({"Browser", "Main"})
@RetryOnFailure
public void testInfoBarContainerSwapsWebContents()
......
......@@ -8,10 +8,3 @@
-org.chromium.chrome.browser.FeaturesAnnotationsTest.testFeaturesAddToExistingFlags
-org.chromium.chrome.browser.FeaturesAnnotationsTest.testFeaturesDoNotRemoveExistingFlags
-org.chromium.chrome.browser.FeaturesAnnotationsTest.testFeaturesSetExistingFlags
# https://crbug.com/721403
-org.chromium.chrome.browser.TabsOpenedFromExternalAppTest.testLaunchWebLiteURL
-org.chromium.chrome.browser.appmenu.DataSaverAppMenuTest.testMenuDataSaver
-org.chromium.chrome.browser.appmenu.DataSaverAppMenuTest.testMenuDataSaverPersistent
-org.chromium.chrome.browser.customtabs.CustomTabActivityTest.testLaunchWebLiteURL
-org.chromium.chrome.browser.infobar.InfoBarTest.testDataReductionPromoInfoBar
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