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/ntp_snippets/remote/remote_suggestions_provider_impl.h" | 5 #include "components/ntp_snippets/remote/remote_suggestions_provider_impl.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 return base::MakeUnique<net::FakeURLFetcher>( | 344 return base::MakeUnique<net::FakeURLFetcher>( |
345 url, d, /*response_data=*/std::string(), net::HTTP_NOT_FOUND, | 345 url, d, /*response_data=*/std::string(), net::HTTP_NOT_FOUND, |
346 net::URLRequestStatus::FAILED); | 346 net::URLRequestStatus::FAILED); |
347 } | 347 } |
348 }; | 348 }; |
349 | 349 |
350 class MockImageFetcher : public ImageFetcher { | 350 class MockImageFetcher : public ImageFetcher { |
351 public: | 351 public: |
352 MOCK_METHOD1(SetImageFetcherDelegate, void(ImageFetcherDelegate*)); | 352 MOCK_METHOD1(SetImageFetcherDelegate, void(ImageFetcherDelegate*)); |
353 MOCK_METHOD1(SetDataUseServiceName, void(DataUseServiceName)); | 353 MOCK_METHOD1(SetDataUseServiceName, void(DataUseServiceName)); |
| 354 MOCK_METHOD1(SetImageDownloadLimit, |
| 355 void(base::Optional<int64_t> max_download_bytes)); |
354 MOCK_METHOD1(SetDesiredImageFrameSize, void(const gfx::Size&)); | 356 MOCK_METHOD1(SetDesiredImageFrameSize, void(const gfx::Size&)); |
355 MOCK_METHOD3(StartOrQueueNetworkRequest, | 357 MOCK_METHOD3(StartOrQueueNetworkRequest, |
356 void(const std::string&, | 358 void(const std::string&, |
357 const GURL&, | 359 const GURL&, |
358 const ImageFetcherCallback&)); | 360 const ImageFetcherCallback&)); |
359 MOCK_METHOD0(GetImageDecoder, image_fetcher::ImageDecoder*()); | 361 MOCK_METHOD0(GetImageDecoder, image_fetcher::ImageDecoder*()); |
360 }; | 362 }; |
361 | 363 |
362 class FakeImageDecoder : public image_fetcher::ImageDecoder { | 364 class FakeImageDecoder : public image_fetcher::ImageDecoder { |
363 public: | 365 public: |
(...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1816 EXPECT_CALL(scheduler, OnProviderActivated()); | 1818 EXPECT_CALL(scheduler, OnProviderActivated()); |
1817 // The scheduler should be notified of clearing the history. | 1819 // The scheduler should be notified of clearing the history. |
1818 EXPECT_CALL(scheduler, OnSuggestionsCleared()); | 1820 EXPECT_CALL(scheduler, OnSuggestionsCleared()); |
1819 | 1821 |
1820 service->SetRemoteSuggestionsScheduler(&scheduler); | 1822 service->SetRemoteSuggestionsScheduler(&scheduler); |
1821 service->OnStatusChanged(RemoteSuggestionsStatus::ENABLED_AND_SIGNED_OUT, | 1823 service->OnStatusChanged(RemoteSuggestionsStatus::ENABLED_AND_SIGNED_OUT, |
1822 RemoteSuggestionsStatus::ENABLED_AND_SIGNED_IN); | 1824 RemoteSuggestionsStatus::ENABLED_AND_SIGNED_IN); |
1823 } | 1825 } |
1824 | 1826 |
1825 } // namespace ntp_snippets | 1827 } // namespace ntp_snippets |
OLD | NEW |