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

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

Issue 2532953006: Throw if PaymentRequest() built with 'error' message (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/Source/modules/payments/PaymentRequest.cpp » ('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 aa44b1f22c1695c0a8505a4dc2ad13cb1d64e17b..094f5e8850de4c0925e3aaa38214bdc7b215ce8c 100644
--- a/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
+++ b/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
@@ -351,6 +351,15 @@ generate_tests(assert_throws, [
}],
['Empty string for payment method specific data parameter should throw', null, function() {
new PaymentRequest([{'supportedMethods': ['foo'], 'data': ''}], buildDetails())
+ }],
+ ['If details contains a null value for error, then throw a TypeError', new TypeError(), function() {
foolip 2016/11/29 21:48:28 This will stringify to 'null', but it doesn't hurt
please use gerrit instead 2016/11/29 21:49:47 Acknowledged.
+ new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'error': null})
+ }],
+ ['If details contains an empty string value for error, then throw a TypeError', new TypeError(), function() {
+ new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'error': ''})
+ }],
+ ['If details contains a non-empty string value for error, then throw a TypeError', new TypeError(), function() {
+ new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'error': 'Message'})
}]
]);
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/PaymentRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698