Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1202)

Unified Diff: chrome/browser/omnibox/omnibox_field_trial_unittest.cc

Issue 24733003: Update defaults for InstantExtended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up test. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/omnibox/omnibox_field_trial_unittest.cc
diff --git a/chrome/browser/omnibox/omnibox_field_trial_unittest.cc b/chrome/browser/omnibox/omnibox_field_trial_unittest.cc
index 82522b6dc6973d3761ab570cf83051e084e18a08..72147a338296ac42ce58945e87cfb409f8067e3f 100644
--- a/chrome/browser/omnibox/omnibox_field_trial_unittest.cc
+++ b/chrome/browser/omnibox/omnibox_field_trial_unittest.cc
@@ -218,7 +218,8 @@ TEST_F(OmniboxFieldTrialTest, GetValueForRuleInContext) {
base::FieldTrialList::CreateFieldTrial(
OmniboxFieldTrial::kBundledExperimentFieldTrialName, "A");
- // Tests with Instant Extended disabled.
+ // Instant Extended only works on non-mobile platforms.
+#if defined(OS_IOS) || defined(OS_ANDROID)
// Tests for rule 1.
ExpectRuleValue("rule1-1-0-value",
"rule1", AutocompleteInput::NEW_TAB_PAGE); // exact match
@@ -257,14 +258,7 @@ TEST_F(OmniboxFieldTrialTest, GetValueForRuleInContext) {
// Tests for rule 5 (a missing rule).
ExpectRuleValue("",
"rule5", AutocompleteInput::OTHER); // no rule at all
-
- // Now change the Instant Extended state and run analogous tests.
- // Instant Extended only works on non-mobile platforms.
-#if !defined(OS_IOS) && !defined(OS_ANDROID)
- chrome::ResetInstantExtendedOptInStateGateForTest();
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableInstantExtendedAPI);
-
+#else
// Tests with Instant Extended enabled.
// Tests for rule 1.
ExpectRuleValue("rule1-4-1-value",
@@ -297,5 +291,5 @@ TEST_F(OmniboxFieldTrialTest, GetValueForRuleInContext) {
// Tests for rule 5 (a missing rule).
ExpectRuleValue("",
"rule5", AutocompleteInput::OTHER); // no rule at all
-#endif // !defined(OS_IOS) && !defined(OS_ANDROID)
+#endif // defined(OS_IOS) || defined(OS_ANDROID)
}

Powered by Google App Engine
This is Rietveld 408576698