Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: third_party/WebKit/Source/core/fetch/MockResource.h

Issue 2560763002: Loading: Use MockResource in MemoryCacheCorrectnessTest.cpp (Closed)
Patch Set: [rebase] Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MockResource_h 5 #ifndef MockResource_h
6 #define MockResource_h 6 #define MockResource_h
7 7
8 #include "core/fetch/Resource.h" 8 #include "core/fetch/Resource.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class FetchRequest; 13 class FetchRequest;
14 class ResourceFetcher; 14 class ResourceFetcher;
15 struct ResourceLoaderOptions; 15 struct ResourceLoaderOptions;
16 16
17 // Mocked Resource sub-class for testing. MockResource class can pretend a type 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 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 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. 20 // class to verify classes that consume Resource sub-classes in a simple way.
21 class MockResource final : public Resource { 21 class MockResource final : public Resource {
22 public: 22 public:
23 static MockResource* fetch(FetchRequest&, ResourceFetcher*); 23 static MockResource* fetch(FetchRequest&, ResourceFetcher*);
24 static MockResource* create(const ResourceRequest&);
24 MockResource(const ResourceRequest&, const ResourceLoaderOptions&); 25 MockResource(const ResourceRequest&, const ResourceLoaderOptions&);
25 }; 26 };
26 27
27 } // namespace blink 28 } // namespace blink
28 29
29 #endif 30 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698