OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "modules/payments/MockFunction.h" |
| 6 |
| 7 namespace blink { |
| 8 |
| 9 v8::Local<v8::Function> MockFunction::noExpectations(ScriptState* scriptState) |
| 10 { |
| 11 MockFunction* self = new MockFunction(scriptState); |
| 12 return self->bindToV8Function(); |
| 13 } |
| 14 |
| 15 v8::Local<v8::Function> MockFunction::expectCall(ScriptState* scriptState) |
| 16 { |
| 17 MockFunction* self = new MockFunction(scriptState); |
| 18 EXPECT_CALL(*self, call(testing::_)); |
| 19 return self->bindToV8Function(); |
| 20 } |
| 21 |
| 22 v8::Local<v8::Function> MockFunction::expectNoCall(ScriptState* scriptState) |
| 23 { |
| 24 MockFunction* self = new MockFunction(scriptState); |
| 25 EXPECT_CALL(*self, call(testing::_)).Times(0); |
| 26 return self->bindToV8Function(); |
| 27 } |
| 28 |
| 29 MockFunction::MockFunction(ScriptState* scriptState) |
| 30 : ScriptFunction(scriptState) |
| 31 { |
| 32 ON_CALL(*this, call(testing::_)).WillByDefault(testing::ReturnArg<0>()); |
| 33 } |
| 34 |
| 35 } // namespace blink |
OLD | NEW |