| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/payments/PaymentTestHelper.h" | 5 #include "modules/payments/PaymentTestHelper.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptState.h" | 7 #include "bindings/core/v8/ScriptState.h" |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "modules/payments/PaymentCurrencyAmount.h" | 9 #include "modules/payments/PaymentCurrencyAmount.h" |
| 10 #include "modules/payments/PaymentMethodData.h" | 10 #include "modules/payments/PaymentMethodData.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 { | 150 { |
| 151 v8::MicrotasksScope::PerformCheckpoint(m_scriptState->isolate()); | 151 v8::MicrotasksScope::PerformCheckpoint(m_scriptState->isolate()); |
| 152 for (MockFunction* mockFunction : m_mockFunctions) { | 152 for (MockFunction* mockFunction : m_mockFunctions) { |
| 153 testing::Mock::VerifyAndClearExpectations(mockFunction); | 153 testing::Mock::VerifyAndClearExpectations(mockFunction); |
| 154 } | 154 } |
| 155 } | 155 } |
| 156 | 156 |
| 157 v8::Local<v8::Function> PaymentRequestMockFunctionScope::expectCall(String* capt
or) | 157 v8::Local<v8::Function> PaymentRequestMockFunctionScope::expectCall(String* capt
or) |
| 158 { | 158 { |
| 159 m_mockFunctions.append(new MockFunction(m_scriptState, captor)); | 159 m_mockFunctions.append(new MockFunction(m_scriptState, captor)); |
| 160 EXPECT_CALL(*m_mockFunctions.last(), call(testing::_)); |
| 160 return m_mockFunctions.last()->bind(); | 161 return m_mockFunctions.last()->bind(); |
| 161 } | 162 } |
| 162 | 163 |
| 163 v8::Local<v8::Function> PaymentRequestMockFunctionScope::expectCall() | 164 v8::Local<v8::Function> PaymentRequestMockFunctionScope::expectCall() |
| 164 { | 165 { |
| 165 m_mockFunctions.append(new MockFunction(m_scriptState)); | 166 m_mockFunctions.append(new MockFunction(m_scriptState)); |
| 166 EXPECT_CALL(*m_mockFunctions.last(), call(testing::_)); | 167 EXPECT_CALL(*m_mockFunctions.last(), call(testing::_)); |
| 167 return m_mockFunctions.last()->bind(); | 168 return m_mockFunctions.last()->bind(); |
| 168 } | 169 } |
| 169 | 170 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 192 ON_CALL(*this, call(testing::_)).WillByDefault( | 193 ON_CALL(*this, call(testing::_)).WillByDefault( |
| 193 testing::DoAll(SaveValueIn(m_value), testing::ReturnArg<0>())); | 194 testing::DoAll(SaveValueIn(m_value), testing::ReturnArg<0>())); |
| 194 } | 195 } |
| 195 | 196 |
| 196 v8::Local<v8::Function> PaymentRequestMockFunctionScope::MockFunction::bind() | 197 v8::Local<v8::Function> PaymentRequestMockFunctionScope::MockFunction::bind() |
| 197 { | 198 { |
| 198 return bindToV8Function(); | 199 return bindToV8Function(); |
| 199 } | 200 } |
| 200 | 201 |
| 201 } // namespace blink | 202 } // namespace blink |
| OLD | NEW |