Can't disable features in instrumentation tests from command line flags |
|
Issue descriptionFrom https://chromium-review.googlesource.com/c/576029/ @Test @SmallTest @CommandLineFlags.Add("--disable-features=NTPArticleSuggestions") public void testRemoteSuggestionsEnabledWhenFeatureDisabled() { Assert.assertFalse(ChromeFeatureList.isEnabled("NTPArticleSuggestions")); // <- Fails Assert.assertFalse( mNtp.getManagerForTesting().getSuggestionsSource().areRemoteSuggestionsEnabled()); }
,
Jul 19 2017
/facepalm thanks that works.
But that means that we have flags that have no effect then, right?
This is sprinkled all over the place
@CommandLineFlags.Add({
ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG,
})
The network one is defined as
public static final String DISABLE_NETWORK_PREDICTION_FLAG =
"--disable-features=NetworkPrediction";
,
Jul 19 2017
... hm, yeah, that's a bug :/ |
|
►
Sign in to add a comment |
|
Comment 1 by jbudorick@chromium.org
, Jul 19 2017I think you would want to use that w/o the leading "--", i.e. @CommandLineFlags.Add("disable-features=NTPArticleSuggestions") e.g. https://codesearch.chromium.org/search/?q=CommandLineFlags.Add%5C(%5C%22disable-features&sq=package:chromium&type=cs