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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 CHECK(result.is_valid()); | 80 CHECK(result.is_valid()); |
81 return result; | 81 return result; |
82 } | 82 } |
83 | 83 |
84 class MockImageFetcher : public image_fetcher::ImageFetcher { | 84 class MockImageFetcher : public image_fetcher::ImageFetcher { |
85 public: | 85 public: |
86 MOCK_METHOD1(SetImageFetcherDelegate, | 86 MOCK_METHOD1(SetImageFetcherDelegate, |
87 void(image_fetcher::ImageFetcherDelegate* delegate)); | 87 void(image_fetcher::ImageFetcherDelegate* delegate)); |
88 MOCK_METHOD1(SetDataUseServiceName, | 88 MOCK_METHOD1(SetDataUseServiceName, |
89 void(image_fetcher::ImageFetcher::DataUseServiceName name)); | 89 void(image_fetcher::ImageFetcher::DataUseServiceName name)); |
| 90 MOCK_METHOD1(SetImageDownloadLimit, |
| 91 void(base::Optional<int64_t> max_download_bytes)); |
90 MOCK_METHOD1(SetDesiredImageFrameSize, void(const gfx::Size& size)); | 92 MOCK_METHOD1(SetDesiredImageFrameSize, void(const gfx::Size& size)); |
91 MOCK_METHOD3(StartOrQueueNetworkRequest, | 93 MOCK_METHOD3(StartOrQueueNetworkRequest, |
92 void(const std::string&, | 94 void(const std::string&, |
93 const GURL&, | 95 const GURL&, |
94 const ImageFetcherCallback&)); | 96 const ImageFetcherCallback&)); |
95 MOCK_METHOD0(GetImageDecoder, image_fetcher::ImageDecoder*()); | 97 MOCK_METHOD0(GetImageDecoder, image_fetcher::ImageDecoder*()); |
96 }; | 98 }; |
97 | 99 |
98 class LargeIconServiceTest : public testing::Test { | 100 class LargeIconServiceTest : public testing::Test { |
99 public: | 101 public: |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 large_icon_service_ | 375 large_icon_service_ |
374 .GetLargeIconOrFallbackStyleFromGoogleServerSkippingLocalCache( | 376 .GetLargeIconOrFallbackStyleFromGoogleServerSkippingLocalCache( |
375 GURL(kDummyUrl), /*min_source_size_in_pixel=*/42, callback.Get()); | 377 GURL(kDummyUrl), /*min_source_size_in_pixel=*/42, callback.Get()); |
376 | 378 |
377 EXPECT_CALL(callback, Run(false)); | 379 EXPECT_CALL(callback, Run(false)); |
378 base::RunLoop().RunUntilIdle(); | 380 base::RunLoop().RunUntilIdle(); |
379 } | 381 } |
380 | 382 |
381 } // namespace | 383 } // namespace |
382 } // namespace favicon | 384 } // namespace favicon |
OLD | NEW |