| 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/PaymentDetailsTestHelper.h" | 5 #include "modules/payments/PaymentTestHelper.h" |
| 6 | 6 |
| 7 #include "modules/payments/CurrencyAmount.h" | 7 #include "modules/payments/CurrencyAmount.h" |
| 8 #include "platform/heap/HeapAllocator.h" | 8 #include "platform/heap/HeapAllocator.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 namespace { | 11 namespace { |
| 12 | 12 |
| 13 // PaymentItem and ShippingOption have identical structure | 13 // PaymentItem and ShippingOption have identical structure |
| 14 // except for the "id" field, which is present only in ShippingOption. | 14 // except for the "id" field, which is present only in ShippingOption. |
| 15 template <typename PaymentItemOrShippingOption> | 15 template <typename PaymentItemOrShippingOption> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 shippingOption = buildShippingOptionForTest(); | 84 shippingOption = buildShippingOptionForTest(); |
| 85 | 85 |
| 86 PaymentDetails result; | 86 PaymentDetails result; |
| 87 result.setTotal(total); | 87 result.setTotal(total); |
| 88 result.setDisplayItems(HeapVector<PaymentItem>(1, item)); | 88 result.setDisplayItems(HeapVector<PaymentItem>(1, item)); |
| 89 result.setShippingOptions(HeapVector<ShippingOption>(2, shippingOption)); | 89 result.setShippingOptions(HeapVector<ShippingOption>(2, shippingOption)); |
| 90 | 90 |
| 91 return result; | 91 return result; |
| 92 } | 92 } |
| 93 | 93 |
| 94 HeapVector<PaymentMethodData> buildPaymentMethodDataForTest() |
| 95 { |
| 96 HeapVector<PaymentMethodData> methodData(1, PaymentMethodData()); |
| 97 methodData[0].setSupportedMethods(Vector<String>(1, "foo")); |
| 98 return methodData; |
| 99 } |
| 100 |
| 94 } // namespace blink | 101 } // namespace blink |
| OLD | NEW |