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

Unified Diff: chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc

Issue 10535125: Move the query to the start of the Google search URL in hopes of being slightly more user-friendly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « chrome/browser/search_engines/template_url_prepopulate_data.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_engines/template_url_prepopulate_data_unittest.cc
===================================================================
--- chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc (revision 141606)
+++ chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc (working copy)
@@ -126,17 +126,6 @@
EXPECT_EQ(1001, t_urls[0]->prepopulate_id());
}
-TEST(TemplateURLPrepopulateDataTest, GetEngineName) {
- EXPECT_EQ(ASCIIToUTF16("Atlas"),
- TemplateURLPrepopulateData::GetEngineName("http://search.atlas.cz/"));
- EXPECT_EQ(ASCIIToUTF16("Google"),
- TemplateURLPrepopulateData::GetEngineName("http://www.google.com/"));
- EXPECT_EQ(ASCIIToUTF16("example.com"),
- TemplateURLPrepopulateData::GetEngineName("http://example.com/"));
- EXPECT_EQ(l10n_util::GetStringUTF16(IDS_UNKNOWN_SEARCH_ENGINE_NAME),
- TemplateURLPrepopulateData::GetEngineName("!@#"));
-}
-
TEST(TemplateURLPrepopulateDataTest, GetEngineTypeBasic) {
EXPECT_EQ(SEARCH_ENGINE_OTHER,
TemplateURLPrepopulateData::GetEngineType("http://example.com/"));
@@ -152,17 +141,15 @@
// Google URLs in different forms.
const char* kGoogleURLs[] = {
// Original with google:baseURL:
- "{google:baseURL}search?{google:RLZ}{google:acceptedSuggestion}"
- "{google:originalQueryForSuggestion}{google:searchFieldtrialParameter}"
- "sourceid=chrome&ie={inputEncoding}&q={searchTerms}",
- // Custom with google.com:
+ "{google:baseURL}search?q={searchTerms}&{google:RLZ}"
+ "{google:acceptedSuggestion}{google:originalQueryForSuggestion}"
+ "{google:searchFieldtrialParameter}sourceid=chrome&ie={inputEncoding}",
+ // Custom with google.com and reordered query params:
"http://google.com/search?{google:RLZ}{google:acceptedSuggestion}"
"{google:originalQueryForSuggestion}{google:searchFieldtrialParameter}"
"sourceid=chrome&ie={inputEncoding}&q={searchTerms}",
- // Custom with a country TLD:
- "http://www.google.ru/search?{google:RLZ}{google:acceptedSuggestion}"
- "{google:originalQueryForSuggestion}{google:searchFieldtrialParameter}"
- "sourceid=chrome&ie={inputEncoding}&q={searchTerms}"
+ // Custom with a country TLD and almost no query params:
+ "http://www.google.ru/search?q={searchTerms}"
};
for (size_t i = 0; i < arraysize(kGoogleURLs); ++i) {
EXPECT_EQ(SEARCH_ENGINE_GOOGLE,
« no previous file with comments | « chrome/browser/search_engines/template_url_prepopulate_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698