| 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/PaymentResponse.h" | 5 #include "modules/payments/PaymentResponse.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "bindings/core/v8/ScriptState.h" | 8 #include "bindings/core/v8/ScriptState.h" |
| 9 #include "bindings/core/v8/ScriptValue.h" | 9 #include "bindings/core/v8/ScriptValue.h" |
| 10 #include "bindings/core/v8/V8Binding.h" | 10 #include "bindings/core/v8/V8Binding.h" |
| 11 #include "bindings/core/v8/V8BindingForTesting.h" | 11 #include "bindings/core/v8/V8BindingForTesting.h" |
| 12 #include "modules/payments/PaymentCompleter.h" | 12 #include "modules/payments/PaymentCompleter.h" |
| 13 #include "modules/payments/PaymentTestHelper.h" | 13 #include "modules/payments/PaymentTestHelper.h" |
| 14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include <memory> | 16 #include "wtf/OwnPtr.h" |
| 17 #include <utility> | 17 #include <utility> |
| 18 | 18 |
| 19 namespace blink { | 19 namespace blink { |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 class MockPaymentCompleter : public GarbageCollectedFinalized<MockPaymentComplet
er>, public PaymentCompleter { | 22 class MockPaymentCompleter : public GarbageCollectedFinalized<MockPaymentComplet
er>, public PaymentCompleter { |
| 23 USING_GARBAGE_COLLECTED_MIXIN(MockPaymentCompleter); | 23 USING_GARBAGE_COLLECTED_MIXIN(MockPaymentCompleter); |
| 24 WTF_MAKE_NONCOPYABLE(MockPaymentCompleter); | 24 WTF_MAKE_NONCOPYABLE(MockPaymentCompleter); |
| 25 | 25 |
| 26 public: | 26 public: |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 MockPaymentCompleter* completeCallback = new MockPaymentCompleter; | 99 MockPaymentCompleter* completeCallback = new MockPaymentCompleter; |
| 100 PaymentResponse output(std::move(input), completeCallback); | 100 PaymentResponse output(std::move(input), completeCallback); |
| 101 | 101 |
| 102 EXPECT_CALL(*completeCallback, complete(scope.getScriptState(), Fail)); | 102 EXPECT_CALL(*completeCallback, complete(scope.getScriptState(), Fail)); |
| 103 | 103 |
| 104 output.complete(scope.getScriptState(), "fail"); | 104 output.complete(scope.getScriptState(), "fail"); |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace | 107 } // namespace |
| 108 } // namespace blink | 108 } // namespace blink |
| OLD | NEW |