Closed Bug 1833891 Opened 1 year ago Closed 1 year ago

Worker module tests for construction with a file URL fail

Categories

(Core :: DOM: Workers, defect, P2)

defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox-esr115 --- fixed
firefox116 --- fixed

People

(Reporter: jonco, Assigned: allstars.chh)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The following two WPTs are failing:

/workers/modules/dedicated-worker-import-failure.html
 - Worker construction for a file URL should throw an exception.
/workers/modules/shared-worker-import-failure.html
 - SharedWorker construction for a file URL should throw an exception.

The test expect new Worker to synchronously throw a SecurityError when attempting to start a module worker with a file: URL.

I checked our implmentation and the worker does fail to start but a synchronous error is not thrown.

Looking at the spec I'm not sure this is required:

https://html.spec.whatwg.org/#dom-worker

Regardless we may want to make this throw synchronously in this case anyway since modules are always fetched using CORS which precludes the use of file: URLs.

Hi Yoshi, could you help take a look at this?

Severity: -- → S3
Flags: needinfo?(allstars.chh)
Priority: -- → P2
Assignee: nobody → allstars.chh
Flags: needinfo?(allstars.chh)

When worker is trying to load some cross-origin script, the error
handling is not consistent accross all browsers,
see https://github.com/web-platform-tests/wpt/pull/13671

So this patch references the test "/workers/Worker_cross_origin_security_err.htm"
and updates the test to make it pass on Firefox.

Attachment #9336745 - Attachment description: Bug 1833891 - Update the test in dedicated-worker-import-failure.html. → Bug 1833891 - Update the WPT test for error handling behavior when worker loading a cross-origin script.
Pushed by allstars.chh@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/73259a567a07
Update the WPT test for error handling behavior when worker loading a cross-origin script. r=dom-worker-reviewers,smaug,zcorpan
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/40496 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 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: