Closed Bug 1541630 Opened 6 months ago Closed 5 months ago

[wpt-sync] Sync PR 16142 - Use step_timeout() to force spin the EventLoop

Categories

(Testing :: web-platform-tests, defect, P4)

defect

Tracking

(firefox68 fixed)

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream error])

Sync web-platform-tests PR 16142 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/16142
Details from upstream follow.

Danyao Wang <danyao@chromium.org> wrote:

Use step_timeout() to force spin the EventLoop

Test improvement for w3c/payment-request#854.

Empirically in Chrome, await Promise.resolve() doesn't cause what comes after it to be run in the next event loop tick, which the test requires. My best understanding of the ES6 Job Queue is that this is expected. So changing this test to use step_timeout which guarantees a new tick.

Also properly catch the rejection of eventPromise because it happens before acceptPromise resolves.

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/70137a989042
[wpt PR 16142] - Use step_timeout() to force spin the EventLoop, a=testonly
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/499cb375a3c1
[wpt PR 16142] - Use step_timeout() to force spin the EventLoop, a=testonly
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.