| Index: third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp
|
| diff --git a/third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp b/third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp
|
| index eedf68e12ebce3ee3783f842bfcf68cb14994da8..49f1a1d618cb161ae3a81ebd86a97e2d2497e941 100644
|
| --- a/third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp
|
| +++ b/third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp
|
| @@ -4,18 +4,18 @@
|
|
|
| #include "modules/payments/PaymentTestHelper.h"
|
|
|
| -#include "modules/payments/CurrencyAmount.h"
|
| +#include "modules/payments/PaymentCurrencyAmount.h"
|
| #include "platform/heap/HeapAllocator.h"
|
|
|
| namespace blink {
|
| namespace {
|
|
|
| -// PaymentItem and ShippingOption have identical structure
|
| -// except for the "id" field, which is present only in ShippingOption.
|
| -template <typename PaymentItemOrShippingOption>
|
| -void setValues(PaymentItemOrShippingOption& original, PaymentTestDataToChange data, PaymentTestModificationType modificationType, const String& valueToUse)
|
| +// PaymentItem and PaymentShippingOption have identical structure
|
| +// except for the "id" field, which is present only in PaymentShippingOption.
|
| +template <typename PaymentItemOrPaymentShippingOption>
|
| +void setValues(PaymentItemOrPaymentShippingOption& original, PaymentTestDataToChange data, PaymentTestModificationType modificationType, const String& valueToUse)
|
| {
|
| - CurrencyAmount itemAmount;
|
| + PaymentCurrencyAmount itemAmount;
|
| if (data == PaymentTestDataCurrencyCode) {
|
| if (modificationType == PaymentTestOverwriteValue)
|
| itemAmount.setCurrency(valueToUse);
|
| @@ -50,9 +50,9 @@ PaymentItem buildPaymentItemForTest(PaymentTestDataToChange data, PaymentTestMod
|
| return item;
|
| }
|
|
|
| -ShippingOption buildShippingOptionForTest(PaymentTestDataToChange data, PaymentTestModificationType modificationType, const String& valueToUse)
|
| +PaymentShippingOption buildShippingOptionForTest(PaymentTestDataToChange data, PaymentTestModificationType modificationType, const String& valueToUse)
|
| {
|
| - ShippingOption shippingOption;
|
| + PaymentShippingOption shippingOption;
|
| if (data == PaymentTestDataId) {
|
| if (modificationType == PaymentTestOverwriteValue)
|
| shippingOption.setId(valueToUse);
|
| @@ -77,7 +77,7 @@ PaymentDetails buildPaymentDetailsForTest(PaymentTestDetailToChange detail, Paym
|
| else
|
| item = buildPaymentItemForTest();
|
|
|
| - ShippingOption shippingOption;
|
| + PaymentShippingOption shippingOption;
|
| if (detail == PaymentTestDetailShippingOption)
|
| shippingOption = buildShippingOptionForTest(data, modificationType, valueToUse);
|
| else
|
| @@ -86,7 +86,7 @@ PaymentDetails buildPaymentDetailsForTest(PaymentTestDetailToChange detail, Paym
|
| PaymentDetails result;
|
| result.setTotal(total);
|
| result.setDisplayItems(HeapVector<PaymentItem>(1, item));
|
| - result.setShippingOptions(HeapVector<ShippingOption>(2, shippingOption));
|
| + result.setShippingOptions(HeapVector<PaymentShippingOption>(2, shippingOption));
|
|
|
| return result;
|
| }
|
|
|