Description
The tests added for #855, which was wrapped into the WebCompat focus area, are in an odd state.
These are the current tests: https://wpt.fyi/results/workers/constructors?label=master&label=experimental&view=interop&q=label%3Ainterop-2025-webcompat
None of them actually check the failure-due-to-CSP scenario that was #855 was raised about. They test other kinds of Worker construction failure scenarios which would need their own compatibility analyses to see whether they're feasible to change.
Meanwhile the tests that check the CSP scenario, as @gsnedders pointed out, are here: https://wpt.fyi/results/content-security-policy/worker-src?label=experimental&label=master&aligned
But, these are checking the wrong behavior, and as @LiangTheDev commented here they need to be updated to match the spec so that they check for an error event instead of the Worker constructor throwing an exception. Liang's CL https://chromium-review.googlesource.com/c/chromium/src/+/6155655 would update those tests. The result of that test update would be that the failures Firefox has in https://wpt.fyi/results/content-security-policy/worker-src?label=experimental&label=master&aligned would start passing, and those same tests would start failing in Chrome, Edge, and Safari instead.
So to align with the intent of #855 I think the right thing is to:
- Land the test changes in https://chromium-review.googlesource.com/c/chromium/src/+/6155655 so that the failures in https://wpt.fyi/results/content-security-policy/worker-src?label=experimental&label=master&aligned change to the opposite set of browsers.
- Change the WebCompat focus area tests for this issue from https://wpt.fyi/results/workers/constructors?label=master&label=experimental&view=interop&q=label%3Ainterop-2025-webcompat to https://wpt.fyi/results/content-security-policy/worker-src?label=experimental&label=master&aligned