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

Unified Diff: components/search_provider_logos/logo_tracker_unittest.cc

Issue 606443004: Revert of Revert of Fix doodle verification URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « components/search_provider_logos/google_logo_api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_provider_logos/logo_tracker_unittest.cc
diff --git a/components/search_provider_logos/logo_tracker_unittest.cc b/components/search_provider_logos/logo_tracker_unittest.cc
index c32df2afd8b0b3f027b4836a6c69c3e31f3d1e6b..84f8a22c7075dd487024996cc824b2b96fe52887 100644
--- a/components/search_provider_logos/logo_tracker_unittest.cc
+++ b/components/search_provider_logos/logo_tracker_unittest.cc
@@ -371,8 +371,7 @@
const std::string& response_when_fingerprint,
net::URLRequestStatus::Status request_status,
net::HttpStatusCode response_code) {
- GURL url_with_fp =
- net::AppendQueryParameter(logo_url_, "async", "es_dfp:" + fingerprint);
+ GURL url_with_fp = GoogleAppendFingerprintToLogoURL(logo_url_, fingerprint);
fake_url_fetcher_factory_.SetFakeResponse(
url_with_fp, response_when_fingerprint, response_code, request_status);
}
@@ -383,6 +382,16 @@
}
// Tests -----------------------------------------------------------------------
+
+TEST_F(LogoTrackerTest, FingerprintURLHasColon) {
+ GURL url_with_fp = GoogleAppendFingerprintToLogoURL(
+ GURL("http://logourl.com/path"), "abc123");
+ EXPECT_EQ("http://logourl.com/path?async=es_dfp:abc123", url_with_fp.spec());
+
+ url_with_fp = GoogleAppendFingerprintToLogoURL(
+ GURL("http://logourl.com/?a=b"), "cafe0");
+ EXPECT_EQ("http://logourl.com/?a=b&async=es_dfp:cafe0", url_with_fp.spec());
+}
TEST_F(LogoTrackerTest, DownloadAndCacheLogo) {
Logo logo = GetSampleLogo(logo_url_, test_clock_->Now());
« no previous file with comments | « components/search_provider_logos/google_logo_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698