| Index: third_party/WebKit/Source/modules/payments/MockFunction.cpp
|
| diff --git a/third_party/WebKit/Source/modules/payments/MockFunction.cpp b/third_party/WebKit/Source/modules/payments/MockFunction.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d20b10660125804d8d95b123a000d0d2dc3aa86f
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/modules/payments/MockFunction.cpp
|
| @@ -0,0 +1,35 @@
|
| +// 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 "modules/payments/MockFunction.h"
|
| +
|
| +namespace blink {
|
| +
|
| +v8::Local<v8::Function> MockFunction::noExpectations(ScriptState* scriptState)
|
| +{
|
| + MockFunction* self = new MockFunction(scriptState);
|
| + return self->bindToV8Function();
|
| +}
|
| +
|
| +v8::Local<v8::Function> MockFunction::expectCall(ScriptState* scriptState)
|
| +{
|
| + MockFunction* self = new MockFunction(scriptState);
|
| + EXPECT_CALL(*self, call(testing::_));
|
| + return self->bindToV8Function();
|
| +}
|
| +
|
| +v8::Local<v8::Function> MockFunction::expectNoCall(ScriptState* scriptState)
|
| +{
|
| + MockFunction* self = new MockFunction(scriptState);
|
| + EXPECT_CALL(*self, call(testing::_)).Times(0);
|
| + return self->bindToV8Function();
|
| +}
|
| +
|
| +MockFunction::MockFunction(ScriptState* scriptState)
|
| + : ScriptFunction(scriptState)
|
| +{
|
| + ON_CALL(*this, call(testing::_)).WillByDefault(testing::ReturnArg<0>());
|
| +}
|
| +
|
| +} // namespace blink
|
|
|