Closed Bug 1727314 Opened 3 months ago Closed 3 months ago

[wpt-sync] Sync PR 30153 - [CSP] Fix WPT style-src/style-blocked

Categories

(Core :: DOM: Security, task, P4)

task

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Antonio Sartori <antoniosartori@chromium.org>' wrote:

[CSP] Fix WPT style-src/style-blocked

Since a fetch request blocked by CSP returns a network error,
document.styleSheets should still contain an item for the blocked CSS.
This test was expecting none, and in fact it was failing for all
vendors.

While fixing the test, I also rewrote it using modern conventions.

Bug: 651742
Change-Id: Id585d73a298bf36e6a660e9611efb5ababa1d6df
Reviewed-on: https://chromium-review.googlesource.com/3059454
WPT-Export-Revision: 10559058ca8cd2a0e1f38a66bd9b9ffb45e64802

Component: web-platform-tests → DOM: Security
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 2 subtests

Status Summary

Firefox

OK : 1
FAIL : 2

Chrome

OK : 1
PASS : 2

Safari

FAIL : 1
TIMEOUT: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/content-security-policy/style-src/style-blocked.html
Violated directive is script-src-elem.: FAIL (Chrome: PASS, Safari: TIMEOUT)
document.styleSheets should contain an item for the blocked CSS.: FAIL (Chrome: PASS, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b23f3f7c92ae
[wpt PR 30153] - [CSP] Fix WPT style-src/style-blocked, a=testonly
https://hg.mozilla.org/integration/autoland/rev/af0b33cc4f09
[wpt PR 30153] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.