Run all CSP tests in CI by default. (#36436)

Extending the original set from #36402 since there are additional tests
relevant to the work happening in #36409 and #36363.

Testing: New tests in CI.
Fixes: Part of https://github.com/servo/servo/issues/4577

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-04-10 04:09:23 -04:00 committed by GitHub
parent a0730d7154
commit c16ca22970
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
509 changed files with 5492 additions and 12 deletions

View file

@ -0,0 +1,2 @@
[import-style-allowed.sub.html]
expected: ERROR

View file

@ -0,0 +1,2 @@
[import-style-blocked.sub.html]
expected: ERROR

View file

@ -0,0 +1,3 @@
[injected-inline-style-blocked.sub.html]
[Expecting logs: ["violated-directive=style-src-elem","violated-directive=style-src-elem","PASS"\]]
expected: FAIL

View file

@ -0,0 +1,13 @@
[inline-style-allowed-while-cloning-objects.sub.html]
expected: TIMEOUT
[Test that violation report event was fired]
expected: NOTRUN
[inline-style-allowed-while-cloning-objects 12]
expected: FAIL
[inline-style-allowed-while-cloning-objects 14]
expected: FAIL
[non-HTML namespace]
expected: FAIL

View file

@ -0,0 +1,3 @@
[inline-style-attribute-blocked.sub.html]
[Expecting logs: ["violated-directive=style-src-attr","PASS"\]]
expected: FAIL

View file

@ -0,0 +1,7 @@
[inline-style-blocked.sub.html]
expected: TIMEOUT
[Triggers securitypolicyviolation.]
expected: TIMEOUT
[Inline style element is blocked by CSP.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[style-blocked.html]
expected: TIMEOUT
[Violated directive is script-src-elem.]
expected: TIMEOUT

View file

@ -0,0 +1,7 @@
[style-src-error-event-fires.html]
expected: TIMEOUT
[Test error event fires on stylesheet link]
expected: NOTRUN
[Test error event fires on inline style]
expected: NOTRUN

View file

@ -0,0 +1,7 @@
[style-src-hash-blocked.html]
expected: TIMEOUT
[Should not load style that does not match hash]
expected: FAIL
[Should fire a securitypolicyviolation event]
expected: NOTRUN

View file

@ -0,0 +1,4 @@
[style-src-imported-style-blocked.html]
expected: TIMEOUT
[Should fire a securitypolicyviolation event]
expected: NOTRUN

View file

@ -0,0 +1,7 @@
[style-src-injected-inline-style-blocked.html]
expected: TIMEOUT
[Injected style attributes should not be applied]
expected: FAIL
[Should fire a securitypolicyviolation event]
expected: NOTRUN

View file

@ -0,0 +1,7 @@
[style-src-injected-stylesheet-blocked.sub.html]
expected: TIMEOUT
[Programatically injected stylesheet should not load]
expected: FAIL
[Should fire a securitypolicyviolation event]
expected: NOTRUN

View file

@ -0,0 +1,7 @@
[style-src-inline-style-attribute-blocked.html]
expected: TIMEOUT
[Inline style attribute should not be applied without 'unsafe-inline']
expected: FAIL
[Should fire a securitypolicyviolation event]
expected: NOTRUN

View file

@ -0,0 +1,7 @@
[style-src-inline-style-blocked.html]
expected: TIMEOUT
[Inline style element should not load without 'unsafe-inline']
expected: FAIL
[Should fire a securitypolicyviolation event]
expected: NOTRUN

View file

@ -0,0 +1,7 @@
[style-src-inline-style-nonce-blocked-error-event.html]
expected: TIMEOUT
[Should fire a securitypolicyviolation event]
expected: NOTRUN
[Test that paragraph remains unmodified and error events received.]
expected: NOTRUN

View file

@ -0,0 +1,7 @@
[style-src-inline-style-nonce-blocked.html]
expected: TIMEOUT
[Should not load inline style element with invalid nonce]
expected: FAIL
[Should fire a securitypolicyviolation event]
expected: NOTRUN

View file

@ -0,0 +1,7 @@
[style-src-none-blocked.html]
expected: TIMEOUT
[Should not stylesheet when style-src is 'none']
expected: FAIL
[Should fire a securitypolicyviolation event]
expected: NOTRUN

View file

@ -0,0 +1,7 @@
[style-src-stylesheet-nonce-blocked.html]
expected: TIMEOUT
[Should not load stylesheet without correct nonce]
expected: FAIL
[Should fire a securitypolicyviolation event]
expected: NOTRUN

View file

@ -0,0 +1,3 @@
[stylehash-basic-blocked.sub.html]
[Expecting alerts: ["PASS: The 'p' element's text is green, which means the style was correctly applied.", "violated-directive=style-src-elem"\]]
expected: FAIL

View file

@ -0,0 +1,7 @@
[stylenonce-allowed.sub.html]
expected: TIMEOUT
[Should fire securitypolicyviolation]
expected: NOTRUN
[stylenonce-allowed]
expected: FAIL

View file

@ -0,0 +1,7 @@
[stylenonce-blocked.sub.html]
expected: TIMEOUT
[Should fire securitypolicyviolation]
expected: NOTRUN
[stylenonce-blocked]
expected: FAIL