| 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/PaymentDetailsTestHelper.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 { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 else | 86 else |
| 87 item = buildPaymentItemForTest(); | 87 item = buildPaymentItemForTest(); |
| 88 | 88 |
| 89 ShippingOption shippingOption; | 89 ShippingOption shippingOption; |
| 90 if (detail == PaymentTestDetailShippingOption) | 90 if (detail == PaymentTestDetailShippingOption) |
| 91 shippingOption = buildShippingOptionForTest(data, modificationType, valu
eToUse); | 91 shippingOption = buildShippingOptionForTest(data, modificationType, valu
eToUse); |
| 92 else | 92 else |
| 93 shippingOption = buildShippingOptionForTest(); | 93 shippingOption = buildShippingOptionForTest(); |
| 94 | 94 |
| 95 PaymentDetails result; | 95 PaymentDetails result; |
| 96 result.setItems(HeapVector<PaymentItem>(1, item)); | 96 if (detail == PaymentTestDetailNoItems) |
| 97 result.setItems(HeapVector<PaymentItem>()); |
| 98 else |
| 99 result.setItems(HeapVector<PaymentItem>(1, item)); |
| 97 result.setShippingOptions(HeapVector<ShippingOption>(2, shippingOption)); | 100 result.setShippingOptions(HeapVector<ShippingOption>(2, shippingOption)); |
| 98 | 101 |
| 99 return result; | 102 return result; |
| 100 } | 103 } |
| 101 | 104 |
| 102 } // namespace blink | 105 } // namespace blink |
| OLD | NEW |