| Index: components/image_fetcher/ios/mock_raw_image_fetcher.h
|
| diff --git a/components/image_fetcher/ios/mock_raw_image_fetcher.h b/components/image_fetcher/ios/mock_raw_image_fetcher.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6ed9d99324e4937dc4ed5f37ad19642496d82d3a
|
| --- /dev/null
|
| +++ b/components/image_fetcher/ios/mock_raw_image_fetcher.h
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_IMAGE_FETCHER_IOS_MOCK_RAW_IMAGE_FETCHER_H_
|
| +#define COMPONENTS_IMAGE_FETCHER_IOS_MOCK_RAW_IMAGE_FETCHER_H_
|
| +
|
| +#import "components/image_fetcher/ios/raw_image_fetcher.h"
|
| +
|
| +#include "testing/gmock/include/gmock/gmock.h"
|
| +
|
| +namespace image_fetcher {
|
| +
|
| +// Mock the RawImageFetcher utility class, which can be used to asynchronously
|
| +// retrieve an image from an URL.
|
| +class MockRawImageFetcher : public RawImageFetcher {
|
| + public:
|
| + explicit MockRawImageFetcher(
|
| + const scoped_refptr<base::TaskRunner>& task_runner);
|
| + ~MockRawImageFetcher() override;
|
| +
|
| + MOCK_METHOD4(StartDownload,
|
| + void(const GURL& url,
|
| + ImageFetchedCallback callback,
|
| + const std::string& referrer,
|
| + net::URLRequest::ReferrerPolicy referrer_policy));
|
| + MOCK_METHOD2(StartDownload,
|
| + void(const GURL& url, ImageFetchedCallback callback));
|
| + MOCK_METHOD1(SetRequestContextGetter,
|
| + void(const scoped_refptr<net::URLRequestContextGetter>&
|
| + request_context_getter));
|
| +};
|
| +
|
| +} // namespace image_fetcher
|
| +
|
| +#endif // COMPONENTS_IMAGE_FETCHER_IOS_MOCK_RAW_IMAGE_FETCHER_H_
|
|
|