summaryrefslogtreecommitdiffstats
path: root/content/test/mock_weburlloader.h
diff options
context:
space:
mode:
Diffstat (limited to 'content/test/mock_weburlloader.h')
-rw-r--r--content/test/mock_weburlloader.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/content/test/mock_weburlloader.h b/content/test/mock_weburlloader.h
new file mode 100644
index 0000000..15698c8
--- /dev/null
+++ b/content/test/mock_weburlloader.h
@@ -0,0 +1,33 @@
+// Copyright 2013 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 CONTENT_TEST_MOCK_WEBURLLOADER_H_
+#define CONTENT_TEST_MOCK_WEBURLLOADER_H_
+
+#include "testing/gmock/include/gmock/gmock.h"
+#include "third_party/WebKit/public/platform/WebURLLoader.h"
+
+namespace content {
+
+class MockWebURLLoader : public WebKit::WebURLLoader {
+ public:
+ MockWebURLLoader();
+ virtual ~MockWebURLLoader();
+
+ MOCK_METHOD4(loadSynchronously, void(const WebKit::WebURLRequest& request,
+ WebKit::WebURLResponse& response,
+ WebKit::WebURLError& error,
+ WebKit::WebData& data));
+ MOCK_METHOD2(loadAsynchronously, void(const WebKit::WebURLRequest& request,
+ WebKit::WebURLLoaderClient* client));
+ MOCK_METHOD0(cancel, void());
+ MOCK_METHOD1(setDefersLoading, void(bool value));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockWebURLLoader);
+};
+
+} // namespace content
+
+#endif // CONTENT_TEST_MOCK_WEBURLLOADER_H_