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

Unified Diff: chrome/browser/search/search_unittest.cc

Issue 2204363003: Remove search::ShouldUseAltInstantURL and ShouldUseSearchPathForInstant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests Created 4 years, 4 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
« no previous file with comments | « chrome/browser/search/search.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/search_unittest.cc
diff --git a/chrome/browser/search/search_unittest.cc b/chrome/browser/search/search_unittest.cc
index 00857207e139775863bbea1cd2afa872781cd2f8..1e81c89c56175415fbdb7b301485f377d71f0202 100644
--- a/chrome/browser/search/search_unittest.cc
+++ b/chrome/browser/search/search_unittest.cc
@@ -483,22 +483,6 @@ TEST_F(SearchTest, GetInstantURL) {
// Disable suggest. No Instant URL.
profile()->GetPrefs()->SetBoolean(prefs::kSearchSuggestEnabled, false);
EXPECT_EQ(GURL(), GetInstantURL(profile(), false));
-
- // Use alternate Instant search base URL.
- profile()->GetPrefs()->SetBoolean(prefs::kSearchSuggestEnabled, true);
- ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
- "EmbeddedSearch", "Group1 espv:8 use_alternate_instant_url:1"));
- EXPECT_EQ(GURL("https://foo.com/instant?foo=foo&qbp=1#foo=foo&strk"),
- GetInstantURL(profile(), false));
-}
-
-TEST_F(SearchTest, UseSearchPathForInstant) {
- // Use alternate Instant search base URL path.
- ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
- "EmbeddedSearch",
- "Group1 use_alternate_instant_url:1 use_search_path_for_instant:1"));
- EXPECT_EQ(GURL("https://foo.com/search?foo=foo&qbp=1#foo=foo&strk"),
- GetInstantURL(profile(), false));
}
TEST_F(SearchTest, InstantSearchEnabledCGI) {
@@ -551,33 +535,6 @@ TEST_F(SearchTest, CommandLineOverrides) {
EXPECT_EQ("http://www.bar.com/webhp?a=b&strk", instant_url.spec());
}
-TEST_F(SearchTest, ShouldUseAltInstantURL_DisabledViaFieldTrial) {
- ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
- "EmbeddedSearch", "Group1 espv:8 use_alternate_instant_url:0"));
- EXPECT_FALSE(ShouldUseAltInstantURL());
-}
-
-TEST_F(SearchTest, ShouldUseAltInstantURL_EnabledViaFieldTrial) {
- ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
- "EmbeddedSearch", "Group1 espv:8 use_alternate_instant_url:1"));
- EXPECT_TRUE(ShouldUseAltInstantURL());
-}
-
-TEST_F(SearchTest, ShouldUseSearchPathForInstant_DisabledViaFieldTrial) {
- ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
- "EmbeddedSearch",
- "Group1 use_alternate_instant_url:1 use_search_path_for_instant:0"));
- EXPECT_FALSE(ShouldUseSearchPathForInstant());
-}
-
-TEST_F(SearchTest, ShouldUseSearchPathForInstant_EnabledViaFieldTrial) {
- ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
- "EmbeddedSearch",
- "Group1 use_alternate_instant_url:1 use_search_path_for_instant:1"));
- EXPECT_TRUE(ShouldUseSearchPathForInstant());
-}
-
-
TEST_F(SearchTest, IsNTPURL) {
GURL invalid_url;
GURL ntp_url(chrome::kChromeUINewTabURL);
« no previous file with comments | « chrome/browser/search/search.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698