| OLD | NEW |
| (Empty) |
| 1 // Copyright 2017 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 FetchTestingPlatformSupport_h | |
| 6 #define FetchTestingPlatformSupport_h | |
| 7 | |
| 8 #include "platform/heap/Persistent.h" | |
| 9 #include "platform/testing/TestingPlatformSupport.h" | |
| 10 #include <memory> | |
| 11 | |
| 12 namespace blink { | |
| 13 | |
| 14 class MockFetchContext; | |
| 15 | |
| 16 class FetchTestingPlatformSupport | |
| 17 : public TestingPlatformSupportWithMockScheduler { | |
| 18 public: | |
| 19 FetchTestingPlatformSupport(); | |
| 20 ~FetchTestingPlatformSupport() override; | |
| 21 | |
| 22 MockFetchContext* context(); | |
| 23 | |
| 24 // Platform: | |
| 25 WebURLError cancelledError(const WebURL&) const override; | |
| 26 WebURLLoaderMockFactory* getURLLoaderMockFactory() override; | |
| 27 WebURLLoader* createURLLoader() override; | |
| 28 | |
| 29 private: | |
| 30 class FetchTestingWebURLLoaderMockFactory; | |
| 31 | |
| 32 Persistent<MockFetchContext> m_context; | |
| 33 std::unique_ptr<WebURLLoaderMockFactory> m_urlLoaderMockFactory; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(FetchTestingPlatformSupport); | |
| 36 }; | |
| 37 | |
| 38 } // namespace blink | |
| 39 | |
| 40 #endif | |
| OLD | NEW |