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

Unified Diff: third_party/WebKit/Source/core/loader/MockThreadableLoader.h

Issue 1264453002: Split the constructor of ThreadableLoader into two methods (ctor and start()) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Uplaod MockThreadableLoader Created 4 years, 11 months 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
Index: third_party/WebKit/Source/core/loader/MockThreadableLoader.h
diff --git a/third_party/WebKit/Source/core/loader/MockThreadableLoader.h b/third_party/WebKit/Source/core/loader/MockThreadableLoader.h
new file mode 100644
index 0000000000000000000000000000000000000000..605c43e9e56cf591e72a2a7ca147feb3fd69a844
--- /dev/null
+++ b/third_party/WebKit/Source/core/loader/MockThreadableLoader.h
@@ -0,0 +1,23 @@
+// 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.
+
+#include "core/loader/ThreadableLoader.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "wtf/PassRefPtr.h"
+
+namespace blink {
+
+class MockThreadableLoader : public ThreadableLoader {
+public:
+ static PassRefPtr<MockThreadableLoader> create() { return adoptRef(new testing::StrictMock<MockThreadableLoader>); }
+
+ MOCK_METHOD1(start, void(const ResourceRequest&));
+ MOCK_METHOD1(overrideTimeout, void(unsigned long));
+ MOCK_METHOD0(cancel, void());
+
+protected:
+ MockThreadableLoader() = default;
+};
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698