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

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

Issue 2410143003: Add currencySystem field to PaymentCurrencyAmount (Closed)
Patch Set: Fix tests in Win builds Created 4 years, 2 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/PaymentRequestDetailsTest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequestDetailsTest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequestDetailsTest.cpp
index 626cfa37c9b9a1dfd656f4cfc669d4af5cfe7446..988948ea1bc35689faf06dc53ad478585f9cabb2 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestDetailsTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestDetailsTest.cpp
@@ -98,6 +98,9 @@ std::ostream& operator<<(std::ostream& out, DetailsTestCase testCase) {
case PaymentTestDataCurrencyCode:
out << "currency ";
break;
+ case PaymentTestDataCurrencySystem:
+ out << "currencySystem ";
+ break;
case PaymentTestDataValue:
out << "value ";
break;
@@ -314,146 +317,40 @@ INSTANTIATE_TEST_CASE_P(
PaymentTestDataCurrencyCode,
PaymentTestOverwriteValue,
"USD"),
- DetailsTestCase(PaymentTestDetailTotal,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "US1"),
- DetailsTestCase(PaymentTestDetailTotal,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "US"),
- DetailsTestCase(PaymentTestDetailTotal,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "USD0"),
- DetailsTestCase(PaymentTestDetailTotal,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "usd"),
- DetailsTestCase(PaymentTestDetailTotal,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "ANYSTRING"),
- DetailsTestCase(PaymentTestDetailTotal,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- ""),
-
- DetailsTestCase(PaymentTestDetailItem,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "USD"),
- DetailsTestCase(PaymentTestDetailItem,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "US1"),
- DetailsTestCase(PaymentTestDetailItem,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "US"),
- DetailsTestCase(PaymentTestDetailItem,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "USD0"),
- DetailsTestCase(PaymentTestDetailItem,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "usd"),
- DetailsTestCase(PaymentTestDetailItem,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "ANYSTRING"),
DetailsTestCase(PaymentTestDetailItem,
PaymentTestDataCurrencyCode,
PaymentTestOverwriteValue,
- ""),
-
- DetailsTestCase(PaymentTestDetailShippingOption,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
"USD"),
DetailsTestCase(PaymentTestDetailShippingOption,
PaymentTestDataCurrencyCode,
PaymentTestOverwriteValue,
- "US1"),
- DetailsTestCase(PaymentTestDetailShippingOption,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "US"),
- DetailsTestCase(PaymentTestDetailShippingOption,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "USD0"),
- DetailsTestCase(PaymentTestDetailShippingOption,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "usd"),
- DetailsTestCase(PaymentTestDetailShippingOption,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "ANYSTRING"),
- DetailsTestCase(PaymentTestDetailShippingOption,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- ""),
-
- DetailsTestCase(PaymentTestDetailModifierTotal,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
"USD"),
DetailsTestCase(PaymentTestDetailModifierTotal,
PaymentTestDataCurrencyCode,
PaymentTestOverwriteValue,
- "US1"),
- DetailsTestCase(PaymentTestDetailModifierTotal,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "US"),
- DetailsTestCase(PaymentTestDetailModifierTotal,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "USD0"),
- DetailsTestCase(PaymentTestDetailModifierTotal,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "usd"),
- DetailsTestCase(PaymentTestDetailModifierTotal,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "ANYSTRING"),
- DetailsTestCase(PaymentTestDetailModifierTotal,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- ""),
-
- DetailsTestCase(PaymentTestDetailModifierItem,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
"USD"),
DetailsTestCase(PaymentTestDetailModifierItem,
PaymentTestDataCurrencyCode,
PaymentTestOverwriteValue,
- "US1"),
- DetailsTestCase(PaymentTestDetailModifierItem,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "US"),
- DetailsTestCase(PaymentTestDetailModifierItem,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "USD0"),
- DetailsTestCase(PaymentTestDetailModifierItem,
- PaymentTestDataCurrencyCode,
- PaymentTestOverwriteValue,
- "usd"),
- DetailsTestCase(PaymentTestDetailModifierItem,
- PaymentTestDataCurrencyCode,
+ "USD")));
+
+INSTANTIATE_TEST_CASE_P(
+ ValidCurrencySystem,
+ PaymentRequestDetailsTest,
+ testing::Values(DetailsTestCase(PaymentTestDetailTotal,
+ PaymentTestDataCurrencySystem,
PaymentTestOverwriteValue,
- "ANYSTRING"),
- DetailsTestCase(PaymentTestDetailModifierItem,
- PaymentTestDataCurrencyCode,
+ "https://bitcoin.org")));
+
+INSTANTIATE_TEST_CASE_P(
+ InvalidCurrencySystem,
+ PaymentRequestDetailsTest,
+ testing::Values(DetailsTestCase(PaymentTestDetailTotal,
+ PaymentTestDataCurrencySystem,
PaymentTestOverwriteValue,
- "")));
+ "\\^%\\",
+ true,
+ V8TypeError)));
INSTANTIATE_TEST_CASE_P(
ValidValueFormat,

Powered by Google App Engine
This is Rietveld 408576698