mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Update web-platform-tests to revision 74bae78af4b95a2f0ca3a81df9c7fe3143f24bbc
This commit is contained in:
parent
fb95f9df9c
commit
02c1eed999
150 changed files with 2395 additions and 829 deletions
|
@ -164,16 +164,18 @@ function userIsShownErrorsFields(button) {
|
|||
function abortTheUpdate(button) {
|
||||
button.disabled = true;
|
||||
promise_test(async t => {
|
||||
const { response, request } = await getPaymentRequestResponse({ requestShipping: true });
|
||||
// causes "abort the update" to run
|
||||
const shippingChangedPromise = new Promise(resolve => {
|
||||
request.onshippingoptionchange = () => {
|
||||
event.updateWith({ total: { amount: { currency: "USD", value: "INVALID" } }});
|
||||
const { response, request } = await getPaymentRequestResponse({
|
||||
requestShipping: true,
|
||||
});
|
||||
const shipOptionChangePromise = new Promise(resolve => {
|
||||
request.onshippingoptionchange = event => {
|
||||
// causes "abort the update" to run
|
||||
event.updateWith({ total: "error!" });
|
||||
resolve();
|
||||
};
|
||||
});
|
||||
const retryPromise = response.retry();
|
||||
await shippingChangedPromise;
|
||||
await shipOptionChangePromise;
|
||||
await promise_rejects(
|
||||
t,
|
||||
new TypeError(),
|
||||
|
@ -265,7 +267,9 @@ function callingRetryReturnsUniquePromise(button){
|
|||
</li>
|
||||
<li>
|
||||
<p>
|
||||
When shown the payment sheet, hit pay once. Then retry once.
|
||||
When shown the payment sheet, hit pay once.
|
||||
Then, change the shipping option.
|
||||
Select to pay again.
|
||||
</p>
|
||||
<button onclick="abortTheUpdate(this);">
|
||||
When "abort the update" occurs because of an update error,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue