Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentDetailsTestHelper.cpp

Issue 1861543003: DO NOT SUBMIT This fixes CFI bot, but it's ugly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/payments/PaymentDetailsTestHelper.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentDetailsTestHelper.cpp b/third_party/WebKit/Source/modules/payments/PaymentDetailsTestHelper.cpp
index be2f2721fcdf1db362cc429833855c5a4c505f68..71b6568c4c32bf59ea90be9fdf64ee2ada61f282 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentDetailsTestHelper.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentDetailsTestHelper.cpp
@@ -11,7 +11,7 @@
namespace blink {
-PaymentDetails buildPaymentDetailsForTest(PaymentTestDetailToChange detail, PaymentTestDataToChange data, PaymentTestModificationType modificationType, const String& valueToUse)
+PaymentDetails buildPaymentDetailsForTest(bool setShippingOptions, PaymentTestDetailToChange detail, PaymentTestDataToChange data, PaymentTestModificationType modificationType, const String& valueToUse)
{
CurrencyAmount itemAmount;
if (detail == PaymentTestDetailItem && data == PaymentTestDataCurrencyCode) {
@@ -73,7 +73,10 @@ PaymentDetails buildPaymentDetailsForTest(PaymentTestDetailToChange detail, Paym
PaymentDetails result;
result.setItems(HeapVector<PaymentItem>(1, item));
- result.setShippingOptions(HeapVector<ShippingOption>(2, shippingOption));
+
+ if (setShippingOptions) {
+ result.setShippingOptions(HeapVector<ShippingOption>(2, shippingOption));
+ }
return result;
}

Powered by Google App Engine
This is Rietveld 408576698