Update rejects_if_not_active.https.html#17920
Update rejects_if_not_active.https.html#17920danyao merged 2 commits intoweb-platform-tests:masterfrom
Conversation
…dismissed as a result of navigation
marcoscaceres
left a comment
There was a problem hiding this comment.
Worried about intermittent failures because of the timeout, but let’s see how we go.
My understanding of event loop is not strong... My calculation was that the rejection should happen immediately on |
…omise| to make the test pass in Safari
|
The problem is that it makes assumptions about the test environment, which can be really slow sometimes. This is because, for example, we are testing against unoptimized builds of Firefox on random hardware, so there is little guarantee that anything can happen within 1 second (leading to intermittent failures). Anyway, it may be ok because as you point out it should reject immediately 🤞if it fails randomly, we can always adjust it or come up with something different. |
Use a second payment sheet to detect that the first payment sheet is dismissed as a result of navigation instead of relying on the rejection of the first promise, which may never settle in some implementations (i.e. Blink).
Update this test to match the new proposed spec behavior in w3c/payment-request#872.
In Blink, after the iframe navigates, the original show promise will never settle. This causes the test to timeout. What we really want to check is that the original payment sheet is dismissed and a new payment sheet can be shown. This is what the test is updated to check.