| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef IOS_CHROME_BROWSER_NET_MOCK_IMAGE_FETCHER_H_ | |
| 6 #define IOS_CHROME_BROWSER_NET_MOCK_IMAGE_FETCHER_H_ | |
| 7 | |
| 8 #import "ios/chrome/browser/net/image_fetcher.h" | |
| 9 | |
| 10 #include "testing/gmock/include/gmock/gmock.h" | |
| 11 | |
| 12 // Mock the ImageFetcher utility class, which can be used to asynchronously | |
| 13 // retrieve an image from an URL. | |
| 14 class MockImageFetcher : public ImageFetcher { | |
| 15 public: | |
| 16 explicit MockImageFetcher(const scoped_refptr<base::TaskRunner>& task_runner); | |
| 17 ~MockImageFetcher() override; | |
| 18 | |
| 19 MOCK_METHOD4(StartDownload, | |
| 20 void(const GURL& url, | |
| 21 ImageFetchedCallback callback, | |
| 22 const std::string& referrer, | |
| 23 net::URLRequest::ReferrerPolicy referrer_policy)); | |
| 24 MOCK_METHOD2(StartDownload, | |
| 25 void(const GURL& url, ImageFetchedCallback callback)); | |
| 26 MOCK_METHOD1(SetRequestContextGetter, | |
| 27 void(const scoped_refptr<net::URLRequestContextGetter>& | |
| 28 request_context_getter)); | |
| 29 }; | |
| 30 | |
| 31 #endif // IOS_CHROME_BROWSER_NET_MOCK_IMAGE_FETCHER_H_ | |
| OLD | NEW |