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

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

Issue 345803002: Move GoogleImageSearchSource() from template_url.cc to UIThreadSearchTermsData (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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_engines/template_url_unittest.cc
diff --git a/chrome/browser/search_engines/template_url_unittest.cc b/chrome/browser/search_engines/template_url_unittest.cc
index a830c09d5057e3b583311954281f7e1797e6c0c8..c28936117af5ea7d86f28170fb01d31b4c9b0a1a 100644
--- a/chrome/browser/search_engines/template_url_unittest.cc
+++ b/chrome/browser/search_engines/template_url_unittest.cc
@@ -26,6 +26,7 @@ class TestSearchTermsData : public SearchTermsData {
virtual base::string16 GetRlzParameterValue(
bool from_app_list) const OVERRIDE;
virtual std::string GetSearchClient() const OVERRIDE;
+ virtual std::string GoogleImageSearchSource() const OVERRIDE;
void set_google_base_url(const std::string& google_base_url) {
google_base_url_ = google_base_url;
@@ -59,6 +60,10 @@ std::string TestSearchTermsData::GetSearchClient() const {
return search_client_;
}
+std::string TestSearchTermsData::GoogleImageSearchSource() const {
+ return "google_image_search_source";
+}
+
// TemplateURLTest ------------------------------------------------------------
class TemplateURLTest : public testing::Test {
@@ -255,6 +260,10 @@ TEST_F(TemplateURLTest, URLRefTestImageURLWithPOST) {
base::IntToString(search_args.image_original_size.width()),
i->second);
break;
+ case TemplateURLRef::GOOGLE_IMAGE_SEARCH_SOURCE:
+ EXPECT_EQ("sbisrc", i->first);
+ EXPECT_EQ(search_terms_data.GoogleImageSearchSource(), i->second);
+ break;
case TemplateURLRef::GOOGLE_IMAGE_THUMBNAIL:
EXPECT_EQ("image_content", i->first);
EXPECT_EQ(search_args.image_thumbnail_content, i->second);
« no previous file with comments | « chrome/browser/search_engines/template_url.cc ('k') | chrome/browser/search_engines/ui_thread_search_terms_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698