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

Unified Diff: third_party/WebKit/Source/core/fetch/MockResource.h

Issue 2549093008: Loading: Use MockResource in ResourceFetcherTest.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/fetch/MockResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/MockResource.h
diff --git a/third_party/WebKit/Source/core/fetch/MockResource.h b/third_party/WebKit/Source/core/fetch/MockResource.h
new file mode 100644
index 0000000000000000000000000000000000000000..09e595d0ea1fa9ce6f77bfe2f505f46e69fcec7a
--- /dev/null
+++ b/third_party/WebKit/Source/core/fetch/MockResource.h
@@ -0,0 +1,29 @@
+// Copyright 2016 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 MockResource_h
+#define MockResource_h
+
+#include "core/fetch/Resource.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class FetchRequest;
+class ResourceFetcher;
+struct ResourceLoaderOptions;
+
+// Mocked Resource sub-class for testing. MockResource class can pretend a type
+// of Resource sub-class in a simple way. You should not expect anything
+// complicated to emulate actual sub-resources, but you may be able to use this
+// class to verify classes that consume Resource sub-classes in a simple way.
+class MockResource final : public Resource {
+ public:
+ static MockResource* fetch(FetchRequest&, ResourceFetcher*);
+ MockResource(const ResourceRequest&, const ResourceLoaderOptions&);
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/fetch/MockResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698