| 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 aa44b1f22c1695c0a8505a4dc2ad13cb1d64e17b..58cf0637be2bebf3ce458faf555c553f4c0f0eeb 100644
|
| --- a/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
|
| +++ b/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
|
| @@ -270,18 +270,36 @@ test(function() {
|
| }, 'Android Pay parameters for produciton environment with network token should not throw.');
|
|
|
| test(function() {
|
| + new PaymentRequest([{'supportedMethods': ['basic-card'], 'data': {'supportedTypes': ['debit'], 'supportedNetworks': ['visa']}}], buildDetails());
|
| +}, 'Basic card parameters should not throw.');
|
| +
|
| +test(function() {
|
| + new PaymentRequest([{'supportedMethods': ['basic-card'], 'data': {'supportedTypes': [], 'supportedNetworks': []}}], buildDetails());
|
| +}, 'Empty basic card parameters should not throw.');
|
| +
|
| +test(function() {
|
| + new PaymentRequest([{'supportedMethods': ['not-basic-card'], 'data': {'supportedTypes': 0, 'supportedNetworks': 'foo'}}], buildDetails());
|
| +}, 'Invalid basic card parameters should not throw when method name is not "basic-card".');
|
| +
|
| +test(function() {
|
| new PaymentRequest([{'supportedMethods': ['https://android.com/pay'], 'data': {'merchantName': 'Merchant Inc', 'merchantId': '123', 'allowedCardNetworks': ['AMEX', 'DISCOVER', 'MASTERCARD', 'VISA'], 'paymentMethodTokenizationParameters': {'tokenizationType': 'NETWORK_TOKEN', 'parameters': {'key': 'value'}}}}], buildDetails());
|
| }, 'Android Pay parameters for network token without environment key should not throw.');
|
|
|
| test(function() {
|
| - new PaymentRequest([{'supportedMethods': ['https://android.com/pay'], 'data': {'merchantName': []}}], buildDetails());
|
| -}, 'Invalid Android Pay parameters should not throw.');
|
| + new PaymentRequest([{'supportedMethods': ['https://bobpay.com'], 'data': {'allowedCardNetworks': 0}}], buildDetails());
|
| +}, 'Invalid Android Pay parameters should not throw when method name is not "https://android.com/pay".');
|
|
|
| promise_test(function(t) {
|
| return promise_rejects(t, null, new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails()).abort());
|
| }, 'abort() without show() should reject with error');
|
|
|
| generate_tests(assert_throws, [
|
| + ['"basic-card" method specific data should use correct format.', null, function() {
|
| + new PaymentRequest([{'supportedMethods': ['basic-card'], 'data': {'supportedTypes': 0, 'supportedNetworks': 'foo'}}], buildDetails());
|
| + }],
|
| + ['"https://android.com/pay" method specific data should use correct format.', null, function() {
|
| + new PaymentRequest([{'supportedMethods': ['https://android.com/pay'], 'data': {'allowedCardNetworks': 0}}], buildDetails());
|
| + }],
|
| ['PaymentRequest constructor should throw for incorrect parameter types.', null, function() {
|
| new PaymentRequest('', '', '')
|
| }],
|
|
|