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 0455d16b71d46c39345a9ab21ce9d9266eb0dd2a..d7a216813b5f97ae7eae0d9db9b10a6591f10eca 100644 |
--- a/third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp |
+++ b/third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp |
@@ -114,15 +114,25 @@ PaymentDetails buildPaymentDetailsForTest(PaymentTestDetailToChange detail, Paym |
else |
modifier = buildPaymentDetailsModifierForTest(); |
+ String errorMessage = ""; |
+ if (detail == PaymentTestDetailError) |
+ errorMessage = valueToUse; |
+ |
PaymentDetails result; |
result.setTotal(total); |
result.setDisplayItems(HeapVector<PaymentItem>(1, item)); |
result.setShippingOptions(HeapVector<PaymentShippingOption>(1, shippingOption)); |
result.setModifiers(HeapVector<PaymentDetailsModifier>(1, modifier)); |
+ result.setError(errorMessage); |
return result; |
} |
+PaymentDetails buildPaymentDetailsErrorMsgForTest(const String& valueToUse) |
+{ |
+ return buildPaymentDetailsForTest(PaymentTestDetailError, PaymentTestDataNone, PaymentTestOverwriteValue, valueToUse); |
+} |
+ |
HeapVector<PaymentMethodData> buildPaymentMethodDataForTest() |
{ |
HeapVector<PaymentMethodData> methodData(1, PaymentMethodData()); |