| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 GURL url_with_fp = GoogleAppendQueryparamsToLogoURL( | 420 GURL url_with_fp = GoogleAppendQueryparamsToLogoURL( |
| 421 GURL("http://logourl.com/path"), "abc123", true, false); | 421 GURL("http://logourl.com/path"), "abc123", true, false); |
| 422 EXPECT_EQ("http://logourl.com/path?async=es_dfp:abc123,cta:1", | 422 EXPECT_EQ("http://logourl.com/path?async=es_dfp:abc123,cta:1", |
| 423 url_with_fp.spec()); | 423 url_with_fp.spec()); |
| 424 | 424 |
| 425 url_with_fp = GoogleAppendQueryparamsToLogoURL( | 425 url_with_fp = GoogleAppendQueryparamsToLogoURL( |
| 426 GURL("http://logourl.com/?a=b"), "", true, false); | 426 GURL("http://logourl.com/?a=b"), "", true, false); |
| 427 EXPECT_EQ("http://logourl.com/?a=b&async=cta:1", url_with_fp.spec()); | 427 EXPECT_EQ("http://logourl.com/?a=b&async=cta:1", url_with_fp.spec()); |
| 428 } | 428 } |
| 429 | 429 |
| 430 TEST_F(LogoTrackerTest, CTATransparentHasCommas) { | 430 TEST_F(LogoTrackerTest, CTAGrayBackgroundHasCommas) { |
| 431 GURL url_with_fp = GoogleAppendQueryparamsToLogoURL( | 431 GURL url_with_fp = GoogleAppendQueryparamsToLogoURL( |
| 432 GURL("http://logourl.com/path"), "abc123", true, true); | 432 GURL("http://logourl.com/path"), "abc123", true, true); |
| 433 EXPECT_EQ( | 433 EXPECT_EQ( |
| 434 "http://logourl.com/path?async=es_dfp:abc123,cta:1,transp:1,graybg:1", | 434 "http://logourl.com/path?async=es_dfp:abc123,cta:1,transp:1,graybg:1", |
| 435 url_with_fp.spec()); | 435 url_with_fp.spec()); |
| 436 | 436 |
| 437 url_with_fp = GoogleAppendQueryparamsToLogoURL( | 437 url_with_fp = GoogleAppendQueryparamsToLogoURL( |
| 438 GURL("http://logourl.com/?a=b"), "", true, true); | 438 GURL("http://logourl.com/?a=b"), "", true, true); |
| 439 EXPECT_EQ("http://logourl.com/?a=b&async=cta:1,transp:1,graybg:1", | 439 EXPECT_EQ("http://logourl.com/?a=b&async=cta:1,transp:1,graybg:1", |
| 440 url_with_fp.spec()); | 440 url_with_fp.spec()); |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 MockLogoObserver listener2; | 753 MockLogoObserver listener2; |
| 754 listener2.ExpectFreshLogo(&logo); | 754 listener2.ExpectFreshLogo(&logo); |
| 755 logo_tracker_->GetLogo(&listener2); | 755 logo_tracker_->GetLogo(&listener2); |
| 756 | 756 |
| 757 base::RunLoop().RunUntilIdle(); | 757 base::RunLoop().RunUntilIdle(); |
| 758 } | 758 } |
| 759 | 759 |
| 760 } // namespace | 760 } // namespace |
| 761 | 761 |
| 762 } // namespace search_provider_logos | 762 } // namespace search_provider_logos |
| OLD | NEW |