Remove deadlock from payment-is-showing test #17262
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
payment-is-show.https.html tests that if multiple contexts try to call
PaymentRequest.show()
, all but the first one rejects.Before this patch, each
PaymentRequest.show()
is wrapped inside its owntest_driver.bless()
. This creates a deadlock when running the tests directly in the browser: the first payment sheet prevents the user from interacting with the test page to click on the button generated bytest_driver.bless()
, which in turn blocks the test from proceeding, which will eventually abort the payment sheet. This deadlock breaks the web test runner.This patch combines all
PaymentRequset.show()
calls of a single test case inside a singletest_driver.bless()
call. This way, each test only requires user to click on a single block.The only exceptions are the two tests that trigger popups and call
.show()
from the main test page. The test requires a user gesture to bring the main page back into foreground. User has to click on two buttons to make these tests proceed.