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