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

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

Issue 2048823004: PaymentRequest.abort() should return a promise. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/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 8bdec6d5803b28a472c60afda0f8825ea45029db..b8cfbeb18f7f2ca94c61b0db4769ecf2a5b7ff94 100644
--- a/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
+++ b/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
@@ -181,6 +181,10 @@ test(function() {
});
}, 'Absence of total should throw TypeError.');
+promise_test(function(t) {
+ return promise_rejects(t, null, new PaymentRequest(['foo'], buildDetails()).abort());
+}, 'abort() without show() should reject with error');
+
generate_tests(assert_throws, [
['PaymentRequest constructor should throw for incorrect parameter types.', null, function() {
new PaymentRequest('', '', '', '')
@@ -206,9 +210,6 @@ generate_tests(assert_throws, [
['Null shipping options should throw', new TypeError(), function() {
new PaymentRequest(['foo'], {'total': buildItem(), 'displayItems': [buildItem()], 'shippingOptions': null});
}],
- ['Aborting before showing should throw.', null, function() {
- new PaymentRequest(['foo'], buildDetails()).abort()
- }],
// Payment method specific data should be a JSON-serializable object.
['Array value for payment method specific data parameter should throw', null, function() {

Powered by Google App Engine
This is Rietveld 408576698