Fail | Empty credentialIds field throws exception. | assert_throws_js: function "() => {
new PaymentRequest([{
supportedMethods: 'secure-payment-confirmation',
data: {
relyingPartyId: 'relying-party.example',
// Empty credentialIds field.
credentialIds: [],
challenge: Uint8Array.from('x', c => c.charCodeAt(0)),
payeeOrigin: window.location.origin,
timeout: 60000,
instrument: {
displayName: 'X',
icon: 'https://example.test/icon.png',
},
rpId: 'relying-party.example',
},
}], details);
}" did not throw at Test.<anonymous> (https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:19:3)
at Test.step (https://wpt.live/resources/testharness.js:2642:25)
at test (https://wpt.live/resources/testharness.js:633:30)
at https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:18:1 Asserts runFail | assert_throws_js(function "function RangeError() { [native code] }", function "() => { new PaymentRequest([{ supportedMethods: 'secure-payment-confirmation', data: { relyingPartyId: 'relying-party.example', // Empty credentialIds field. credentialIds: [], challenge: Uint8Array.from('x', c => c.charCodeAt(0)), payeeOrigin: window.location.origin, timeout: 60000, instrument: { displayName: 'X', icon: 'https://example.test/icon.png', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:19:3) |
|
Fail | Empty ID within credentialIds field throws exception. | assert_throws_js: function "() => {
new PaymentRequest([{
supportedMethods: 'secure-payment-confirmation',
data: {
relyingPartyId: 'relying-party.example',
credentialIds: [
Uint8Array.from('c1', c => c.charCodeAt(0)),
new Uint8Array(), // Empty
Uint8Array.from('c2', 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',
},
rpId: 'relying-party.example',
},
}], details);
}" did not throw at Test.<anonymous> (https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:40:3)
at Test.step (https://wpt.live/resources/testharness.js:2642:25)
at test (https://wpt.live/resources/testharness.js:633:30)
at https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:39:1 Asserts runFail | assert_throws_js(function "function RangeError() { [native code] }", function "() => { new PaymentRequest([{ supportedMethods: 'secure-payment-confirmation', data: { relyingPartyId: 'relying-party.example', credentialIds: [ Uint8Array.from('c1', c => c.charCodeAt(0)), new Uint8Array(), // Empty Uint8Array.from('c2', 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', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:40:3) |
|
Pass | Multiple IDs in credentialIds is valid. | Asserts runNo asserts ran |
Pass | Large credentialIds value throws exception. | Asserts runPass | assert_throws_js(function "function TypeError() { [native code] }", function "() => { new PaymentRequest([{ supportedMethods: 'secure-payment-confirmation', data: { // Large credentialIds value. credentialIds: [Uint8Array.from( 'x'.repeat(1024 * 1024), 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', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:85:3) |
|
Fail | Null challenge field throws exception. | assert_throws_js: function "() => {
new PaymentRequest([{
supportedMethods: 'secure-payment-confirmation',
data: {
credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))],
// Null challenge fields.
challenge: null,
payeeOrigin: window.location.origin,
timeout: 60000,
instrument: {
displayName: 'X',
icon: 'https://example.test/icon.png',
},
rpId: 'relying-party.example',
},
}], details);
}" did not throw at Test.<anonymous> (https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:106:3)
at Test.step (https://wpt.live/resources/testharness.js:2642:25)
at test (https://wpt.live/resources/testharness.js:633:30)
at https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:105:1 Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { new PaymentRequest([{ supportedMethods: 'secure-payment-confirmation', data: { credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))], // Null challenge fields. challenge: null, payeeOrigin: window.location.origin, timeout: 60000, instrument: { displayName: 'X', icon: 'https://example.test/icon.png', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:106:3) |
|
Fail | Empty challenge field throws exception. | assert_throws_js: function "() => {
new PaymentRequest([{
supportedMethods: 'secure-payment-confirmation',
data: {
credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))],
// Empty challenge fields.
challenge: [],
payeeOrigin: window.location.origin,
timeout: 60000,
instrument: {
displayName: 'X',
icon: 'https://example.test/icon.png',
},
rpId: 'relying-party.example',
},
}], details);
}" did not throw at Test.<anonymous> (https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:126:3)
at Test.step (https://wpt.live/resources/testharness.js:2642:25)
at test (https://wpt.live/resources/testharness.js:633:30)
at https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:125:1 Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { new PaymentRequest([{ supportedMethods: 'secure-payment-confirmation', data: { credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))], // Empty challenge fields. challenge: [], payeeOrigin: window.location.origin, timeout: 60000, instrument: { displayName: 'X', icon: 'https://example.test/icon.png', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:126:3) |
|
Pass | Large challenge value throws exception. | Asserts runPass | assert_throws_js(function "function TypeError() { [native code] }", function "() => { new PaymentRequest([{ supportedMethods: 'secure-payment-confirmation', data: { credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))], // Large challenge value. challenge: Uint8Array.from('x'.repeat(1024 * 1024), c => c.charCodeAt(0)), payeeOrigin: window.location.origin, timeout: 60000, instrument: { displayName: 'X', icon: 'https://example.test/icon.png', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:146:3) |
|
Fail | Empty instrument.displayName field throws exception. | assert_throws_js: function "() => {
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: '',
icon: 'https://example.test/icon.png',
},
rpId: 'relying-party.example',
},
}], details);
}" did not throw at Test.<anonymous> (https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:166:3)
at Test.step (https://wpt.live/resources/testharness.js:2642:25)
at test (https://wpt.live/resources/testharness.js:633:30)
at https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:165:1 Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { 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: '', icon: 'https://example.test/icon.png', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:166:3) |
|
Fail | Empty instrument.icon field throws exception. | assert_throws_js: function "() => {
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: '',
},
rpId: 'relying-party.example',
},
}], details);
}" did not throw at Test.<anonymous> (https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:185:3)
at Test.step (https://wpt.live/resources/testharness.js:2642:25)
at test (https://wpt.live/resources/testharness.js:633:30)
at https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:184:1 Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { 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: '', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:185:3) |
|
Fail | Invalid instrument.icon URL throws exception. | assert_throws_js: function "() => {
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: 'thisisnotaurl',
},
rpId: 'relying-party.example',
},
}], details);
}" did not throw at Test.<anonymous> (https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:204:3)
at Test.step (https://wpt.live/resources/testharness.js:2642:25)
at test (https://wpt.live/resources/testharness.js:633:30)
at https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:203:1 Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { 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: 'thisisnotaurl', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:204:3) |
|
Fail | Invalid rpId field throws exception. | assert_throws_js: function "() => {
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',
},
rpId: 'domains cannot have spaces.com',
},
}], details);
}" did not throw at Test.<anonymous> (https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:223:3)
at Test.step (https://wpt.live/resources/testharness.js:2642:25)
at test (https://wpt.live/resources/testharness.js:633:30)
at https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:222:1 Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { 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', }, rpId: 'domains cannot have spaces.com', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:223:3) |
|
Fail | Omitting both payee origin and payee name throws exception. | assert_throws_js: function "() => {
new PaymentRequest([{
supportedMethods: 'secure-payment-confirmation',
data: {
// Omitted payee origin and payee name.
credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))],
challenge: Uint8Array.from('x', c => c.charCodeAt(0)),
timeout: 60000,
instrument: {
displayName: 'X',
icon: 'https://example.test/icon.png',
},
rpId: 'relying-party.example',
},
}], details);
}" did not throw at Test.<anonymous> (https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:242:3)
at Test.step (https://wpt.live/resources/testharness.js:2642:25)
at test (https://wpt.live/resources/testharness.js:633:30)
at https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:241:1 Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { new PaymentRequest([{ supportedMethods: 'secure-payment-confirmation', data: { // Omitted payee origin and payee name. credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))], challenge: Uint8Array.from('x', c => c.charCodeAt(0)), timeout: 60000, instrument: { displayName: 'X', icon: 'https://example.test/icon.png', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:242:3) |
|
Pass | Payee name without payee origin is valid. | Asserts runNo asserts ran |
Pass | Providing both payee name and payee origin is valid. | Asserts runNo asserts ran |
Fail | Empty payee name throws exception. | assert_throws_js: function "() => {
new PaymentRequest([{
supportedMethods: 'secure-payment-confirmation',
data: {
credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))],
challenge: Uint8Array.from('x', c => c.charCodeAt(0)),
// Empty payee name
payeeName: '',
payeeOrigin: window.location.origin,
timeout: 60000,
instrument: {
displayName: 'X',
icon: 'https://example.test/icon.png',
},
rpId: 'relying-party.example',
},
}], details);
}" did not throw at Test.<anonymous> (https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:298:3)
at Test.step (https://wpt.live/resources/testharness.js:2642:25)
at test (https://wpt.live/resources/testharness.js:633:30)
at https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:297:1 Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { new PaymentRequest([{ supportedMethods: 'secure-payment-confirmation', data: { credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))], challenge: Uint8Array.from('x', c => c.charCodeAt(0)), // Empty payee name payeeName: '', payeeOrigin: window.location.origin, timeout: 60000, instrument: { displayName: 'X', icon: 'https://example.test/icon.png', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:298:3) |
|
Fail | Empty payee origin throws exception. | assert_throws_js: function "() => {
new PaymentRequest([{
supportedMethods: 'secure-payment-confirmation',
data: {
credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))],
challenge: Uint8Array.from('x', c => c.charCodeAt(0)),
payeeName: 'Example Merchant',
// Empty payee origin
payeeOrigin: '',
timeout: 60000,
instrument: {
displayName: 'X',
icon: 'https://example.test/icon.png',
},
rpId: 'relying-party.example',
},
}], details);
}" did not throw at Test.<anonymous> (https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:319:3)
at Test.step (https://wpt.live/resources/testharness.js:2642:25)
at test (https://wpt.live/resources/testharness.js:633:30)
at https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:318:1 Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { new PaymentRequest([{ supportedMethods: 'secure-payment-confirmation', data: { credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))], challenge: Uint8Array.from('x', c => c.charCodeAt(0)), payeeName: 'Example Merchant', // Empty payee origin payeeOrigin: '', timeout: 60000, instrument: { displayName: 'X', icon: 'https://example.test/icon.png', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:319:3) |
|
Fail | Non-HTTPS payee origin throws exception. | assert_throws_js: function "() => {
new PaymentRequest([{
supportedMethods: 'secure-payment-confirmation',
data: {
credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))],
challenge: Uint8Array.from('x', c => c.charCodeAt(0)),
payeeName: 'Example Merchant',
payeeOrigin: 'http://thepayee.com',
timeout: 60000,
instrument: {
displayName: 'X',
icon: 'https://example.test/icon.png',
},
rpId: 'relying-party.example',
},
}], details);
}" did not throw at Test.<anonymous> (https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:340:3)
at Test.step (https://wpt.live/resources/testharness.js:2642:25)
at test (https://wpt.live/resources/testharness.js:633:30)
at https://wpt.live/secure-payment-confirmation/constructor-validate-payment-method-data.https.html:339:1 Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { new PaymentRequest([{ supportedMethods: 'secure-payment-confirmation', data: { credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))], challenge: Uint8Array.from('x', c => c.charCodeAt(0)), payeeName: 'Example Merchant', payeeOrigin: 'http://thepayee.com', timeout: 60000, instrument: { displayName: 'X', icon: 'https://example.test/icon.png', }, rpId: 'relying-party.example', }, }], details); }")
at Test.<anonymous> ( /secure-payment-confirmation/constructor-validate-payment-method-data.https.html:340:3) |
|