Closed Bug 1849172 Opened 10 months ago Closed 10 months ago

Add reject handler in various /workers/modules/ WPT test

Categories

(Core :: DOM: Workers, task)

task

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: allstars.chh, Assigned: allstars.chh)

Details

Attachments

(1 file)

In some of WPT in /workers/modules/,
for example,
https://searchfox.org/mozilla-central/source/testing/web-platform/tests/workers/modules/dedicated-worker-import-data-url-cross-origin.html

it uses

 const msgEvent =
        await new Promise(resolve => worker.onmessage = resolve);

to do async testing,

But if the operator fails, the promise won't be resolved and will cause timeout,
and it also causes the following tests NOT_RUN.

We should add a reject handler for it, so the test can know it failed and continue the next test.

Add reject handler for the tests, so if one test gets timeout,
the rest of the tests won't get NOT_RUN.

Pushed by allstars.chh@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/a4b3b09ad08d
Add reject handler in /workers/modules/ WPTs. r=dom-worker-reviewers,smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41550 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: