| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/favicon/core/large_icon_service.h" | 5 #include "components/favicon/core/large_icon_service.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 if (fallback_style) { | 290 if (fallback_style) { |
| 291 returned_fallback_style_ = | 291 returned_fallback_style_ = |
| 292 base::MakeUnique<favicon_base::FallbackIconStyle>(*fallback_style); | 292 base::MakeUnique<favicon_base::FallbackIconStyle>(*fallback_style); |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 | 295 |
| 296 void InjectMockResult( | 296 void InjectMockResult( |
| 297 const GURL& page_url, | 297 const GURL& page_url, |
| 298 const favicon_base::FaviconRawBitmapResult& mock_result) { | 298 const favicon_base::FaviconRawBitmapResult& mock_result) { |
| 299 ON_CALL(mock_favicon_service_, | 299 ON_CALL(mock_favicon_service_, |
| 300 GetLargestRawFaviconForPageURL(page_url, _, _, _, _)) | 300 GetLargestRawFaviconForPageURL(page_url, _, _)) |
| 301 .WillByDefault(PostReply<5>(mock_result)); | 301 .WillByDefault(PostReply<3>(mock_result)); |
| 302 } | 302 } |
| 303 | 303 |
| 304 protected: | 304 protected: |
| 305 base::CancelableTaskTracker cancelable_task_tracker_; | 305 base::CancelableTaskTracker cancelable_task_tracker_; |
| 306 | 306 |
| 307 std::unique_ptr<favicon_base::FallbackIconStyle> returned_fallback_style_; | 307 std::unique_ptr<favicon_base::FallbackIconStyle> returned_fallback_style_; |
| 308 std::unique_ptr<gfx::Size> returned_bitmap_size_; | 308 std::unique_ptr<gfx::Size> returned_bitmap_size_; |
| 309 | 309 |
| 310 private: | 310 private: |
| 311 DISALLOW_COPY_AND_ASSIGN(LargeIconServiceGetterTest); | 311 DISALLOW_COPY_AND_ASSIGN(LargeIconServiceGetterTest); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 385 |
| 386 // Every test will appear with suffix /0 (param false) and /1 (param true), e.g. | 386 // Every test will appear with suffix /0 (param false) and /1 (param true), e.g. |
| 387 // LargeIconServiceGetterTest.FallbackSinceTooPicky/0: get image. | 387 // LargeIconServiceGetterTest.FallbackSinceTooPicky/0: get image. |
| 388 // LargeIconServiceGetterTest.FallbackSinceTooPicky/1: get raw bitmap. | 388 // LargeIconServiceGetterTest.FallbackSinceTooPicky/1: get raw bitmap. |
| 389 INSTANTIATE_TEST_CASE_P(, // Empty instatiation name. | 389 INSTANTIATE_TEST_CASE_P(, // Empty instatiation name. |
| 390 LargeIconServiceGetterTest, | 390 LargeIconServiceGetterTest, |
| 391 ::testing::Values(false, true)); | 391 ::testing::Values(false, true)); |
| 392 | 392 |
| 393 } // namespace | 393 } // namespace |
| 394 } // namespace favicon | 394 } // namespace favicon |
| OLD | NEW |