Skip to content

Commit

Permalink
[SPC] Remove WPT tests that involve PaymentOptions
Browse files Browse the repository at this point in the history
The PaymentOptions dict was removed from the PaymentRequest spec a while ago,
so there's no need to test this.

Bug: 1241090, 1206261
Change-Id: I839cb9c771b813dc73a51471b3b4b46d5d66dbcb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3141801
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918312}
  • Loading branch information
stephenmcgruer authored and chromium-wpt-export-bot committed Sep 4, 2021
1 parent 7b80b96 commit 27cce2f
Showing 1 changed file with 0 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,78 +80,6 @@
});
}, 'Extra payment method not allowed beforehand.');

test(() => {
assert_throws_js(RangeError, () => {
new PaymentRequest([{
supportedMethods: 'secure-payment-confirmation',
data: {
credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))],
challenge: Uint8Array.from('x', c => c.charCodeAt(0)),
payeeOrigin: window.location.origin,
timeout: 60000,
instrument: {
displayName: 'X',
icon: 'https://example.test/icon.png',
},
},
}], details, {requestShipping: true});
});
}, 'Cannot request shipping information.');

test(() => {
assert_throws_js(RangeError, () => {
new PaymentRequest([{
supportedMethods: 'secure-payment-confirmation',
data: {
credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))],
challenge: Uint8Array.from('x', c => c.charCodeAt(0)),
payeeOrigin: window.location.origin,
timeout: 60000,
instrument: {
displayName: 'X',
icon: 'https://example.test/icon.png',
},
},
}], details, {requestPayerName: true});
});
}, 'Cannot request payer name.');

test(() => {
assert_throws_js(RangeError, () => {
new PaymentRequest([{
supportedMethods: 'secure-payment-confirmation',
data: {
credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))],
challenge: Uint8Array.from('x', c => c.charCodeAt(0)),
payeeOrigin: window.location.origin,
timeout: 60000,
instrument: {
displayName: 'X',
icon: 'https://example.test/icon.png',
},
},
}], details, {requestPayerEmail: true});
});
}, 'Cannot request payer email.');

test(() => {
assert_throws_js(RangeError, () => {
new PaymentRequest([{
supportedMethods: 'secure-payment-confirmation',
data: {
credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))],
challenge: Uint8Array.from('x', c => c.charCodeAt(0)),
payeeOrigin: window.location.origin,
timeout: 60000,
instrument: {
displayName: 'X',
icon: 'https://example.test/icon.png',
},
},
}], details, {requestPayerPhone: true});
});
}, 'Cannot request payer phone.');

test(() => {
assert_throws_js(TypeError, () => {
new PaymentRequest([{
Expand Down

0 comments on commit 27cce2f

Please sign in to comment.