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

Side by Side Diff: components/search_provider_logos/logo_tracker_unittest.cc

Issue 587943003: 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 unified diff | Download patch
« no previous file with comments | « components/search_provider_logos/google_logo_api.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/search_provider_logos/logo_tracker.h" 5 #include "components/search_provider_logos/logo_tracker.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 net::HttpStatusCode response_code) { 364 net::HttpStatusCode response_code) {
365 fake_url_fetcher_factory_.SetFakeResponse( 365 fake_url_fetcher_factory_.SetFakeResponse(
366 logo_url_, response, response_code, request_status); 366 logo_url_, response, response_code, request_status);
367 } 367 }
368 368
369 void LogoTrackerTest::SetServerResponseWhenFingerprint( 369 void LogoTrackerTest::SetServerResponseWhenFingerprint(
370 const std::string& fingerprint, 370 const std::string& fingerprint,
371 const std::string& response_when_fingerprint, 371 const std::string& response_when_fingerprint,
372 net::URLRequestStatus::Status request_status, 372 net::URLRequestStatus::Status request_status,
373 net::HttpStatusCode response_code) { 373 net::HttpStatusCode response_code) {
374 GURL url_with_fp = 374 GURL url_with_fp = net::AppendQueryParameter(logo_url_, "async", "es_dfp");
375 net::AppendQueryParameter(logo_url_, "async", "es_dfp:" + fingerprint); 375 url_with_fp = GURL(url_with_fp.spec() + ":" + fingerprint);
mmenke 2014/09/23 21:16:17 This seems really ugly. You're basically relying
376 fake_url_fetcher_factory_.SetFakeResponse( 376 fake_url_fetcher_factory_.SetFakeResponse(
377 url_with_fp, response_when_fingerprint, response_code, request_status); 377 url_with_fp, response_when_fingerprint, response_code, request_status);
378 } 378 }
379 379
380 void LogoTrackerTest::GetLogo() { 380 void LogoTrackerTest::GetLogo() {
381 logo_tracker_->GetLogo(&observer_); 381 logo_tracker_->GetLogo(&observer_);
382 base::RunLoop().RunUntilIdle(); 382 base::RunLoop().RunUntilIdle();
383 } 383 }
384 384
385 // Tests ----------------------------------------------------------------------- 385 // Tests -----------------------------------------------------------------------
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 MockLogoObserver listener2; 659 MockLogoObserver listener2;
660 listener2.ExpectFreshLogo(&logo); 660 listener2.ExpectFreshLogo(&logo);
661 logo_tracker_->GetLogo(&listener2); 661 logo_tracker_->GetLogo(&listener2);
662 662
663 base::RunLoop().RunUntilIdle(); 663 base::RunLoop().RunUntilIdle();
664 } 664 }
665 665
666 } // namespace 666 } // namespace
667 667
668 } // namespace search_provider_logos 668 } // namespace search_provider_logos
OLDNEW
« 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