Chromium Code Reviews| 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 |