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

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

Issue 1656673003: Factor out MockThreadableLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added an include guard 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..11920f961dc229d968ddb2dd7c94fa98d3b3a945
--- /dev/null
+++ b/third_party/WebKit/Source/core/loader/MockThreadableLoader.h
@@ -0,0 +1,28 @@
+// 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 MockThreadableLoader_h
+#define MockThreadableLoader_h
+
+#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&));
hiroshige 2016/02/05 05:42:09 If we land this CL before https://codereview.chrom
tyoshino (SeeGerritForStatus) 2016/02/05 07:22:10 Oh, right. I forgot to make it consistent with ToT
+ MOCK_METHOD1(overrideTimeout, void(unsigned long));
+ MOCK_METHOD0(cancel, void());
+
+protected:
+ MockThreadableLoader() = default;
+};
+
+} // namespace blink
+
+#endif // MockThreadableLoader_h

Powered by Google App Engine
This is Rietveld 408576698