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

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

Issue 1135163002: Omnibox - Strip Extra Whitespace from Custom Search Engine Names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests that don't set short_name Created 5 years, 7 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
diff --git a/chrome/browser/search/search_unittest.cc b/chrome/browser/search/search_unittest.cc
index 0307b3cd4998a486e7be7cd4bac16c14ca484739..90007c86c38a331dc42a2f043db098a0091ab5a9 100644
--- a/chrome/browser/search/search_unittest.cc
+++ b/chrome/browser/search/search_unittest.cc
@@ -57,6 +57,7 @@ class SearchTest : public BrowserWithTestWindowTest {
TemplateURLService* template_url_service =
TemplateURLServiceFactory::GetForProfile(profile());
TemplateURLData data;
+ data.SetShortName(base::ASCIIToUTF16("foo.com"));
data.SetURL("http://foo.com/url?bar={searchTerms}");
data.instant_url = "http://foo.com/instant?"
"{google:forceInstantResults}foo=foo#foo=foo&strk";
@@ -86,6 +87,7 @@ class SearchTest : public BrowserWithTestWindowTest {
"http://foo.com/instant?foo=foo#foo=foo";
TemplateURLData data;
+ data.SetShortName(base::ASCIIToUTF16("foo.com"));
data.SetURL("http://foo.com/url?bar={searchTerms}");
data.instant_url = (has_search_term_replacement_key ?
kInstantURLWithStrk : kInstantURLNoStrk);
@@ -511,6 +513,7 @@ TEST_F(SearchTest, CommandLineOverrides) {
TemplateURLService* template_url_service =
TemplateURLServiceFactory::GetForProfile(profile());
TemplateURLData data;
+ data.SetShortName(base::ASCIIToUTF16("Google"));
data.SetURL("{google:baseURL}search?q={searchTerms}");
data.instant_url = "{google:baseURL}webhp?strk";
data.search_terms_replacement_key = "strk";
@@ -763,6 +766,7 @@ class SearchURLTest : public SearchTest {
TemplateURLService* template_url_service =
TemplateURLServiceFactory::GetForProfile(profile());
TemplateURLData data;
+ data.SetShortName(base::ASCIIToUTF16("Google"));
data.SetURL("{google:baseURL}search?"
"{google:instantExtendedEnabledParameter}q={searchTerms}");
data.search_terms_replacement_key = "espv";
« no previous file with comments | « chrome/browser/search/instant_unittest_base.cc ('k') | chrome/browser/search_engines/default_search_pref_migration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698