| Index: third_party/WebKit/Source/core/fetch/FetchTestingPlatformSupport.h
|
| diff --git a/third_party/WebKit/Source/core/fetch/FetchTestingPlatformSupport.h b/third_party/WebKit/Source/core/fetch/FetchTestingPlatformSupport.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..48c4d29d9f4bccfa259466ee0845ac6c27d5ce5c
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/fetch/FetchTestingPlatformSupport.h
|
| @@ -0,0 +1,40 @@
|
| +// Copyright 2017 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 FetchTestingPlatformSupport_h
|
| +#define FetchTestingPlatformSupport_h
|
| +
|
| +#include "platform/heap/Persistent.h"
|
| +#include "platform/testing/TestingPlatformSupport.h"
|
| +#include <memory>
|
| +
|
| +namespace blink {
|
| +
|
| +class MockFetchContext;
|
| +
|
| +class FetchTestingPlatformSupport
|
| + : public TestingPlatformSupportWithMockScheduler {
|
| + public:
|
| + FetchTestingPlatformSupport();
|
| + ~FetchTestingPlatformSupport() override;
|
| +
|
| + MockFetchContext* context();
|
| +
|
| + // Platform:
|
| + WebURLError cancelledError(const WebURL&) const override;
|
| + WebURLLoaderMockFactory* getURLLoaderMockFactory() override;
|
| + WebURLLoader* createURLLoader() override;
|
| +
|
| + private:
|
| + class FetchTestingWebURLLoaderMockFactory;
|
| +
|
| + Persistent<MockFetchContext> m_context;
|
| + std::unique_ptr<WebURLLoaderMockFactory> m_urlLoaderMockFactory;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(FetchTestingPlatformSupport);
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif
|
|
|