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

Unified Diff: third_party/WebKit/LayoutTests/payments/payment-request-interface.html

Issue 2501593003: Implement the new basic card specification. (Closed)
Patch Set: Rebase Created 3 years, 11 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
« no previous file with comments | « components/payments/payment_request.mojom ('k') | third_party/WebKit/Source/modules/modules_idl_files.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dcab558cb638335e1519b4388896cb70e1f5b4c7..5f82a3aa7e6a2c5c3d7e4c0930cf24b28ad08efd 100644
--- a/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
+++ b/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
@@ -270,12 +270,32 @@ 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': ['basic-card'], 'data': {'supportedTypes': 0, 'supportedNetworks': 'foo'}}], buildDetails());
+}, 'Invalid basic card parameters should not throw even when method name is "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".');
+
+test(function() {
+ new PaymentRequest([{'supportedMethods': ['https://android.com/pay'], 'data': {'allowedCardNetworks': 0}}], buildDetails());
+}, 'Invalid Android Pay parameters should not throw even when method name is "https://android.com/pay".');
promise_test(function(t) {
return promise_rejects(t, null, new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails()).abort());
« no previous file with comments | « components/payments/payment_request.mojom ('k') | third_party/WebKit/Source/modules/modules_idl_files.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698