Worker module tests for construction with a file URL fail
Categories
(Core :: DOM: Workers, defect, P2)
Tracking
()
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.
Comment 1•2 years ago
|
||
Hi Yoshi, could you help take a look at this?
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
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.
Updated•2 years ago
|
Comment 5•2 years ago
|
||
bugherder |
Updated•9 months ago
|
Description
•