Index: third_party/WebKit/LayoutTests/payments/payment-request-interface.html |
diff --git a/third_party/WebKit/LayoutTests/payments/payment-request-interface.html b/third_party/WebKit/LayoutTests/payments/payment-request-interface.html |
index aaf6dae84d67e2e622d75b9287bbbc75542c80a7..a0b338f680b5a0b6b085b7648ab80de32b15d22e 100644 |
--- a/third_party/WebKit/LayoutTests/payments/payment-request-interface.html |
+++ b/third_party/WebKit/LayoutTests/payments/payment-request-interface.html |
@@ -226,7 +226,7 @@ test(function() { |
test(function() { |
new PaymentRequest([{'supportedMethods': ['foo']}, {'supportedMethods': ['foo']}], buildDetails(), {}); |
-}, 'Duplicate supported payment method identifiers should not throw.'); |
+}, 'Duplicate supported payment method identifiers in separate methodData objects should not throw.'); |
test(function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': ['foo', 'foo']}]}); |
@@ -234,7 +234,7 @@ test(function() { |
test(function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': ['foo']}, {'supportedMethods': ['foo']}]}); |
-}, 'Duplicate supported payment method identifiers in modifiers should not throw.'); |
+}, 'Duplicate supported payment method identifiers in separate methoData objects of modifiers should not throw.'); |
test(function() { |
new PaymentRequest([{'supportedMethods': ['https://android.com/pay'], 'data': {'environment': 'TEST', 'merchantName': 'Merchant Inc', 'merchantId': '123', 'allowedCardNetworks': ['AMEX', 'DISCOVER', 'MASTERCARD', 'VISA'], 'paymentMethodTokenizationParameters': {'tokenizationType': 'GATEWAY_TOKEN', 'parameters': {'key': 'value'}}}}], buildDetails()); |
@@ -368,51 +368,51 @@ var detailNames = ['total', 'displayItems.0', 'shippingOptions.0', 'modifiers.0. |
for (var i in detailNames) { |
generate_tests(assert_throws, [ |
// Invalid currency code formats. |
- ['Undefined currency code should throw', null, function() { |
+ ['Undefined currency code in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'currency': undefined}), {requestShipping: true}) |
}], |
// Invalid amount formats. |
- ['Invalid amount "-" should throw', null, function() { |
+ ['Invalid amount "-" in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': '-'}), {requestShipping: true}) |
}], |
- ['Invalid amount "notdigits" should throw', null, function() { |
+ ['Invalid amount "notdigits" in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': 'notdigits'}), {requestShipping: true}) |
}], |
- ['Invalid amount "ALSONOTDIGITS" should throw', null, function() { |
+ ['Invalid amount "ALSONOTDIGITS" in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': 'ALSONOTDIGITS'}), {requestShipping: true}) |
}], |
- ['Invalid amount "10." should throw', null, function() { |
+ ['Invalid amount "10." in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': '10.'}), {requestShipping: true}) |
}], |
- ['Invalid amount ".99" should throw', null, function() { |
+ ['Invalid amount ".99" in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': '.99'}), {requestShipping: true}) |
}], |
- ['Invalid amount "-10." should throw', null, function() { |
+ ['Invalid amount "-10." in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': '-10.'}), {requestShipping: true}) |
}], |
- ['Invalid amount "-.99" should throw', null, function() { |
+ ['Invalid amount "-.99" in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': '-.99'}), {requestShipping: true}) |
}], |
- ['Invalid amount "10-" should throw', null, function() { |
+ ['Invalid amount "10-" in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': '10-'}), {requestShipping: true}) |
}], |
- ['Invalid amount "1-0" should throw', null, function() { |
+ ['Invalid amount "1-0" in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': '1-0'}), {requestShipping: true}) |
}], |
- ['Invalid amount "1.0.0" should throw', null, function() { |
+ ['Invalid amount "1.0.0" in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': '1.0.0'}), {requestShipping: true}) |
}], |
- ['Invalid amount "1/3" should throw', null, function() { |
+ ['Invalid amount "1/3" in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': '1/3'}), {requestShipping: true}) |
}], |
- ['Empty amount should throw', null, function() { |
+ ['Empty amount in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': ''}), {requestShipping: true}) |
}], |
- ['Null amount should throw', null, function() { |
+ ['Null amount in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': null}), {requestShipping: true}) |
}], |
- ['Undefined amount should throw', null, function() { |
+ ['Undefined amount in ' + detailNames[i] + ' should throw', null, function() { |
new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails(detailNames[i], {'value': undefined}), {requestShipping: true}) |
}], |
]); |