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

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

Issue 17022004: Replace --google-base-suggest-url and --instant-url with --google-base-url. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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/search/search_unittest.cc
===================================================================
--- chrome/browser/search/search_unittest.cc (revision 206485)
+++ chrome/browser/search/search_unittest.cc (working copy)
@@ -396,17 +396,6 @@
}
}
-TEST_F(SearchTest, CoerceCommandLineURLToTemplateURL) {
- TemplateURL* template_url =
- TemplateURLServiceFactory::GetForProfile(profile())->
- GetDefaultSearchProvider();
- EXPECT_EQ(
- GURL("https://foo.com/dev?bar=bar#bar=bar"),
- CoerceCommandLineURLToTemplateURL(
- GURL("http://myserver.com:9000/dev?bar=bar#bar=bar"),
- template_url->instant_url_ref(), kDisableStartMargin));
-}
-
const SearchTestCase kInstantNTPTestCases[] = {
{"https://foo.com/instant?strk", true, "Valid Instant URL"},
{"https://foo.com/instant#strk", true, "Valid Instant URL"},
@@ -515,19 +504,6 @@
EXPECT_EQ(GURL("https://foo.com/instant?foo=foo#foo=foo&strk"),
GetInstantURL(profile(), kDisableStartMargin));
- // Override the Instant URL on the commandline. Oops, forgot "strk".
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kInstantURL,
- "http://myserver.com:9000/dev?bar=bar#bar=bar");
- EXPECT_EQ(GURL(), GetInstantURL(profile(), kDisableStartMargin));
-
- // Override with "strk". For fun, put it in the query, instead of the ref.
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kInstantURL,
- "http://myserver.com:9000/dev?bar=bar&strk#bar=bar");
- EXPECT_EQ(GURL("http://myserver.com:9000/dev?bar=bar&strk#bar=bar"),
- GetInstantURL(profile(), kDisableStartMargin));
-
// Disable suggest. No Instant URL.
profile()->GetPrefs()->SetBoolean(prefs::kSearchSuggestEnabled, false);
EXPECT_EQ(GURL(), GetInstantURL(profile(), kDisableStartMargin));
@@ -571,15 +547,6 @@
profile()->GetPrefs()->SetBoolean(prefs::kSearchInstantEnabled, false);
EXPECT_TRUE(DefaultSearchProviderSupportsInstant(profile()));
- // Override the Instant URL on the commandline. Oops, forgot "strk".
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kInstantURL,
- "http://myserver.com:9000/dev?bar=bar#bar=bar");
- EXPECT_EQ(GURL(), GetInstantURL(profile(), kDisableStartMargin));
-
- // Check that command line overrides don't affect the default search provider.
- EXPECT_TRUE(DefaultSearchProviderSupportsInstant(profile()));
-
// Disable suggest. No Instant URL.
profile()->GetPrefs()->SetBoolean(prefs::kSearchSuggestEnabled, false);
EXPECT_EQ(GURL(), GetInstantURL(profile(), kDisableStartMargin));

Powered by Google App Engine
This is Rietveld 408576698