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

Unified Diff: third_party/WebKit/Source/modules/payments/MockFunction.h

Issue 2048823004: PaymentRequest.abort() should return a promise. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/modules/payments/MockFunction.h
diff --git a/third_party/WebKit/Source/modules/payments/MockFunction.h b/third_party/WebKit/Source/modules/payments/MockFunction.h
new file mode 100644
index 0000000000000000000000000000000000000000..059512b867f014816a13a07d63de34be20f40fc8
--- /dev/null
+++ b/third_party/WebKit/Source/modules/payments/MockFunction.h
@@ -0,0 +1,30 @@
+// 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 MockFunction_h
+#define MockFunction_h
+
+#include "bindings/core/v8/ScriptFunction.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace blink {
+
+class ScriptState;
+class ScriptValue;
+
+class MockFunction : public ScriptFunction {
Marijn Kruisselbrink 2016/06/08 22:44:12 I'm a bit uncomfortable with having something name
haraken 2016/06/09 01:57:58 It would be better to move this class to V8Binding
please use gerrit instead 2016/06/09 22:36:14 Actually, turns out this implementation of MockFun
+public:
+ static v8::Local<v8::Function> noExpectations(ScriptState*);
+ static v8::Local<v8::Function> expectCall(ScriptState*);
+ static v8::Local<v8::Function> expectNoCall(ScriptState*);
+
+private:
+ explicit MockFunction(ScriptState*);
+
+ MOCK_METHOD1(call, ScriptValue(ScriptValue));
+};
+
+} // namespace blink
+
+#endif // MockFunction_h

Powered by Google App Engine
This is Rietveld 408576698