зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1662543 [wpt PR 25338] - [Web Payment] Very long instrumentId string test., a=testonly
Automatic update from web-platform-tests [Web Payment] Very long instrumentId string test. This patch adds a test for JSON serialization of a very long string being passed into PaymentRequest API. Bug: 1110324, 1115091 Change-Id: Ia6690b2f41ff99190afed4431854515b167056b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2348411 Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org> Reviewed-by: Nick Burris <nburris@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#797165} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359155 Cr-Commit-Position: refs/heads/master@{#803617} -- wpt-commits: a7831be8db72dd936070f2c221a7f9f3c5a0c73b wpt-pr: 25338
This commit is contained in:
Родитель
eaa0d5b024
Коммит
1ba1f0f372
|
@ -264,4 +264,20 @@ test(() => {
|
|||
}], details);
|
||||
});
|
||||
}, 'Timeout longer than 1 hour throws exception.');
|
||||
|
||||
test(() => {
|
||||
assert_throws_js(TypeError, () => {
|
||||
new PaymentRequest([{
|
||||
supportedMethods: 'secure-payment-confirmation',
|
||||
data: {
|
||||
action: 'authenticate',
|
||||
// Large instrumentId value.
|
||||
instrumentId: 'x'.repeat(1024 * 1024),
|
||||
networkData: Uint8Array.from('x', c => c.charCodeAt(0)),
|
||||
timeout: 60000,
|
||||
fallbackUrl: 'https://fallback.example/url'
|
||||
},
|
||||
}], details);
|
||||
});
|
||||
}, 'Large instrumentId value throws exception.');
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче