OLD | NEW |
| (Empty) |
1 // Copyright 2016 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 MockResource_h | |
6 #define MockResource_h | |
7 | |
8 #include "platform/heap/Handle.h" | |
9 #include "platform/loader/fetch/Resource.h" | |
10 | |
11 namespace blink { | |
12 | |
13 class FetchRequest; | |
14 class ResourceFetcher; | |
15 struct ResourceLoaderOptions; | |
16 | |
17 // Mocked Resource sub-class for testing. MockResource class can pretend a type | |
18 // of Resource sub-class in a simple way. You should not expect anything | |
19 // complicated to emulate actual sub-resources, but you may be able to use this | |
20 // class to verify classes that consume Resource sub-classes in a simple way. | |
21 class MockResource final : public Resource { | |
22 public: | |
23 static MockResource* fetch(FetchRequest&, ResourceFetcher*); | |
24 static MockResource* create(const ResourceRequest&); | |
25 MockResource(const ResourceRequest&, const ResourceLoaderOptions&); | |
26 }; | |
27 | |
28 } // namespace blink | |
29 | |
30 #endif | |
OLD | NEW |