9.31content-security-policy/style-src/
89 / 93 WPT subtests passing
- Failed
- 4
- Timed out
- 0
- Not run
- 0
- Test files
- 45
- Blocking files
- 0
Chrome 90 / 93 WPT subtests passing on the same files, none blocking
Tests
45 test files hereEach test file opens in place to its subtests, and each subtest that did not pass to its message.
Test fileSubtests passingChromeFailedStanding
import-style-allowed.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- import should be allowed
import-style-blocked.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- import-style-blocked
injected-inline-style-allowed.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Expecting logs: ["PASS: 2 stylesheets on the page."]
injected-inline-style-blocked.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Expecting logs: ["violated-directive=style-src-elem","violated-directive=style-src-elem","PASS"]
inline-style-allowed-while-cloning-objects.sub.html 22 / 25 passingChrome 22 / 253 failedWith failures
- ¶
FAILinline-style-allowed-while-cloning-objects 19
assert_equals: expected "rgb(238, 130, 238) none repeat scroll 0% 0% / auto padding-box border-box" but got "rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box"
- ¶
FAILinline-style-allowed-while-cloning-objects 20
assert_equals: expected "rgb(238, 130, 238) none repeat scroll 0% 0% / auto padding-box border-box" but got "rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box"
- ¶
FAILnon-HTML namespace
assert_equals: expected "" but got "background: rgb(238, 130, 238)"
22 passing subtests
- Test that violation report event was fired
- inline-style-allowed-while-cloning-objects
- inline-style-allowed-while-cloning-objects 1
- inline-style-allowed-while-cloning-objects 2
- inline-style-allowed-while-cloning-objects 3
- inline-style-allowed-while-cloning-objects 4
- inline-style-allowed-while-cloning-objects 5
- inline-style-allowed-while-cloning-objects 6
- inline-style-allowed-while-cloning-objects 7
- inline-style-allowed-while-cloning-objects 8
- inline-style-allowed-while-cloning-objects 9
- inline-style-allowed-while-cloning-objects 10
- inline-style-allowed-while-cloning-objects 11
- inline-style-allowed-while-cloning-objects 12
- inline-style-allowed-while-cloning-objects 13
- inline-style-allowed-while-cloning-objects 14
- inline-style-allowed-while-cloning-objects 15
- inline-style-allowed-while-cloning-objects 16
- inline-style-allowed-while-cloning-objects 17
- inline-style-allowed-while-cloning-objects 18
- inline-style-allowed-while-cloning-objects 21
- inline-style-allowed-while-cloning-objects 22
inline-style-allowed.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Expecting logs: ["PASS"]
inline-style-attribute-allowed.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Expecting logs: ["PASS"]
inline-style-attribute-blocked.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Expecting logs: ["violated-directive=style-src-attr","PASS"]
inline-style-attribute-on-html.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Expecting logs: ["PASS"]
inline-style-blocked.sub.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Triggers securitypolicyviolation.
- Inline style element is blocked by CSP.
style-allowed.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Expecting logs: ["PASS"]
style-blocked.html 1 / 2 passingChrome 2 / 21 failedWith failures
- ¶
FAILdocument.styleSheets should contain an item for the blocked CSS.
assert_equals: expected 1 but got 0
1 passing subtest
- Violated directive is script-src-elem.
style-src-attr-blocked-createhtmldocument-adopt.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- A security policy violation is reported for the adopted style attribute
- The style attribute is not applied once the element is adopted into the document
style-src-attr-blocked-domparser-adopt.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- A security policy violation is reported for the adopted style attribute
- The style attribute is not applied once the element is adopted into the document
style-src-attr-blocked-template-move.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- A security policy violation is reported for the moved style attribute
- The style attribute is not applied once the element is moved out of the template
style-src-error-event-fires.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Test error event fires on stylesheet link
- Test error event fires on inline style
style-src-hash-allowed.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- All style elements should load because they have proper hashes
style-src-hash-blocked.html 3 / 3 passingChrome 3 / 30 failedClean
3 passing subtests
- Should load the style with a correct hash
- Should not load style that does not match hash
- Should fire a securitypolicyviolation event
style-src-hash-case-insensitive.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- All style elements should load because they have proper hashes
style-src-hash-default-src-allowed.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- All style elements should load because they have proper hashes
style-src-imported-style-allowed.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Imported style that violates policy should not load
style-src-imported-style-blocked.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- @import stylesheet should not load because it does not match style-src
- Should fire a securitypolicyviolation event
style-src-injected-inline-style-allowed-with-content-hash.html 4 / 4 passingChrome 4 / 40 failedClean
4 passing subtests
- Inline injected style without text content should be allowed
- Inline style sheet should be created with null child node
- Inline style should be created with empty-string child node
- Inline style should be applied
style-src-injected-inline-style-allowed.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Injected inline style should load with 'unsafe-inline'
style-src-injected-inline-style-blocked.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Injected style attributes should not be applied
- Should fire a securitypolicyviolation event
style-src-injected-stylesheet-allowed.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Programatically injected stylesheet should load
style-src-injected-stylesheet-blocked.sub.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Programatically injected stylesheet should not load
- Should fire a securitypolicyviolation event
style-src-inline-style-allowed.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Inline style should apply with 'unsafe-inline'
style-src-inline-style-attribute-allowed.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Inline style attribute should apply with 'unsafe-inline'
style-src-inline-style-attribute-blocked.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Inline style attribute should not be applied without 'unsafe-inline'
- Should fire a securitypolicyviolation event
style-src-inline-style-blocked.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Inline style element should not load without 'unsafe-inline'
- Should fire a securitypolicyviolation event
style-src-inline-style-nonce-allowed.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Style with correct nonce should load
style-src-inline-style-nonce-blocked-error-event.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Should fire a securitypolicyviolation event
- Test that paragraph remains unmodified and error events received.
style-src-inline-style-nonce-blocked.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Should not load inline style element with invalid nonce
- Should fire a securitypolicyviolation event
style-src-inline-style-with-csstext.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Manipulating cssText should be allowed with 'self'
style-src-multiple-policies-multiple-hashing-algorithms.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Test that style loads if allowed by proper hash values
- Violation report status OK.
style-src-none-blocked.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Should not stylesheet when style-src is 'none'
- Should fire a securitypolicyviolation event
style-src-star-allowed.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- * should allow any style
style-src-stylesheet-nonce-allowed.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Stylesheet link should load with correct nonce
style-src-stylesheet-nonce-blocked.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Should not load stylesheet without correct nonce
- Should fire a securitypolicyviolation event
stylehash-allowed.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Expecting alerts: ["PASS (1/4): The '#p1' element's text is green, which means the style was correctly applied.","PASS (2/4): The '#p2' element's text is green, which means the style was correctly applied.","PASS (3/4): The '#p3' element's text is green, which means the style was correctly applied.","PASS (4/4): The '#p4' element's text is green, which means the style was correctly applied."]
stylehash-basic-blocked.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Expecting alerts: ["PASS: The 'p' element's text is green, which means the style was correctly applied.", "violated-directive=style-src-elem", "violated-directive=style-src-elem", "violated-directive=style-src-elem"]
stylehash-default-src.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- stylehash allowed from default-src
stylenonce-allowed.sub.html 3 / 3 passingChrome 3 / 30 failedClean
3 passing subtests
- Should fire securitypolicyviolation
- stylenonce-allowed
- stylenonce-allowed 1
stylenonce-blocked.sub.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Should fire securitypolicyviolation
- stylenonce-blocked