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

Side by Side Diff: components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc

Issue 2756633003: [Image Fetcher] Add support to disable cookies (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 url, d, /*response_data=*/std::string(), net::HTTP_NOT_FOUND, 336 url, d, /*response_data=*/std::string(), net::HTTP_NOT_FOUND,
337 net::URLRequestStatus::FAILED); 337 net::URLRequestStatus::FAILED);
338 } 338 }
339 }; 339 };
340 340
341 class MockImageFetcher : public ImageFetcher { 341 class MockImageFetcher : public ImageFetcher {
342 public: 342 public:
343 MOCK_METHOD1(SetImageFetcherDelegate, void(ImageFetcherDelegate*)); 343 MOCK_METHOD1(SetImageFetcherDelegate, void(ImageFetcherDelegate*));
344 MOCK_METHOD1(SetDataUseServiceName, void(DataUseServiceName)); 344 MOCK_METHOD1(SetDataUseServiceName, void(DataUseServiceName));
345 MOCK_METHOD1(SetDesiredImageFrameSize, void(const gfx::Size&)); 345 MOCK_METHOD1(SetDesiredImageFrameSize, void(const gfx::Size&));
346 MOCK_METHOD0(DisableCookies, void());
346 MOCK_METHOD3( 347 MOCK_METHOD3(
347 StartOrQueueNetworkRequest, 348 StartOrQueueNetworkRequest,
348 void(const std::string&, 349 void(const std::string&,
349 const GURL&, 350 const GURL&,
350 base::Callback<void(const std::string&, const gfx::Image&)>)); 351 base::Callback<void(const std::string&, const gfx::Image&)>));
351 MOCK_METHOD0(GetImageDecoder, image_fetcher::ImageDecoder*()); 352 MOCK_METHOD0(GetImageDecoder, image_fetcher::ImageDecoder*());
352 }; 353 };
353 354
354 class FakeImageDecoder : public image_fetcher::ImageDecoder { 355 class FakeImageDecoder : public image_fetcher::ImageDecoder {
355 public: 356 public:
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 EXPECT_CALL(scheduler, OnProviderActivated()); 1805 EXPECT_CALL(scheduler, OnProviderActivated());
1805 // The scheduler should be notified of clearing the history. 1806 // The scheduler should be notified of clearing the history.
1806 EXPECT_CALL(scheduler, OnSuggestionsCleared()); 1807 EXPECT_CALL(scheduler, OnSuggestionsCleared());
1807 1808
1808 service->SetRemoteSuggestionsScheduler(&scheduler); 1809 service->SetRemoteSuggestionsScheduler(&scheduler);
1809 service->OnStatusChanged(RemoteSuggestionsStatus::ENABLED_AND_SIGNED_OUT, 1810 service->OnStatusChanged(RemoteSuggestionsStatus::ENABLED_AND_SIGNED_OUT,
1810 RemoteSuggestionsStatus::ENABLED_AND_SIGNED_IN); 1811 RemoteSuggestionsStatus::ENABLED_AND_SIGNED_IN);
1811 } 1812 }
1812 1813
1813 } // namespace ntp_snippets 1814 } // namespace ntp_snippets
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698