9.29content-security-policy/securitypolicyviolation/
145 / 155 WPT subtests passing
- Failed
- 9
- Timed out
- 1
- Not run
- 0
- Test files
- 42
- Blocking files
- 0
Chrome 135 / 155 WPT subtests passing on the same files, 7 blocking
Tests
42 test files hereEach test file opens in place to its subtests, and each subtest that did not pass to its message.
blockeduri-eval.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Eval violations have a blockedURI of 'eval'
blockeduri-inline.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Inline violations have a blockedURI of 'inline'
blockeduri-ws-wss-scheme.html 0 / 4 passingChrome 0 / 44 failedExempt
Exempt from the 0.1 gate: Crane follows the browser majority
the violation's blockedURI keeps the ws:/wss: scheme and the redirect case times out, exactly as in Chrome, Firefox and Safari (all four subtests, the same assertions)
- Crane matches
- Chrome, Firefox, Safari
- Chrome
- wpt.fyi run 4786307730243584: 0/4 (Chrome 157, 2358bd4835)
- Firefox
- wpt.fyi run 4877168468033536: 0/4 (Firefox 160, 2358bd4835)
- Safari
- wpt.fyi run 6479119966273536: 0/4 (Safari 27.2, 2358bd4835)
- Ruling
- the integrator's golden-rule-2 ruling, 2026-10-17 (lane gr2audit): a WebSocket violation reports the ws/wss URL as all three browsers do; the http(s) text is from 2016 (whatwg/fetch ce16adc5), no engine shipped it or has a bug open, and w3c/webappsec-csp#735 is open
- Revisit
- when Chrome, Firefox or Safari changes its result on a newer aligned wpt.fyi run, or Crane's result moves
- ¶
FAILws
assert_equals: expected "http://web-platform.test:8000/path" but got "ws://web-platform.test:8000/path"
- ¶
FAILwss
assert_equals: expected "https://web-platform.test:8000/path" but got "wss://web-platform.test:8000/path"
- ¶
FAILcross-origin
assert_equals: expected "https://www1.web-platform.test:8000/path" but got "wss://www1.web-platform.test:8000/path"
- ¶
FAILredirect
promise_test: Unhandled rejection with value: "timeout"
constructor-required-fields.html 14 / 14 passingChrome 14 / 140 failedClean
14 passing subtests
- SecurityPolicyViolationEvent constructor should throw with no parameters
- SecurityPolicyViolationEvent constructor works with an init dict
- SecurityPolicyViolationEvent constructor does not require documentURI
- SecurityPolicyViolationEvent constructor does not require violatedDirective
- SecurityPolicyViolationEvent constructor does not require effectiveDirective
- SecurityPolicyViolationEvent constructor does not require originalPolicy
- SecurityPolicyViolationEvent constructor does not require disposition
- SecurityPolicyViolationEvent constructor does not require statusCode
- SecurityPolicyViolationEvent constructor does not require referrer
- SecurityPolicyViolationEvent constructor does not require blockedURI
- SecurityPolicyViolationEvent constructor does not require sourceFile
- SecurityPolicyViolationEvent constructor does not require sample
- SecurityPolicyViolationEvent constructor does not require lineNumber
- SecurityPolicyViolationEvent constructor does not require columnNumber
embed-src-multihop-redirect.sub.html 1 / 1 passingChrome 0 / 10 failedClean
1 passing subtest
- The blocked URI in the security policy violation event for an embed element should be the original URI, not an intermediate one, after more than one redirect.
embed-src-redirect.sub.html 1 / 1 passingChrome 0 / 10 failedClean
1 passing subtest
- The blocked URI in the security policy violation event for an embed element should be the original URI before redirects.
idlharness.window.js 34 / 34 passingChrome 34 / 340 failedClean
34 passing subtests
- idl_test setup
- idl_test validation
- SecurityPolicyViolationEvent interface: existence and properties of interface object
- SecurityPolicyViolationEvent interface object length
- SecurityPolicyViolationEvent interface object name
- SecurityPolicyViolationEvent interface: existence and properties of interface prototype object
- SecurityPolicyViolationEvent interface: existence and properties of interface prototype object's "constructor" property
- SecurityPolicyViolationEvent interface: existence and properties of interface prototype object's @@unscopables property
- SecurityPolicyViolationEvent interface: attribute documentURI
- SecurityPolicyViolationEvent interface: attribute referrer
- SecurityPolicyViolationEvent interface: attribute blockedURI
- SecurityPolicyViolationEvent interface: attribute effectiveDirective
- SecurityPolicyViolationEvent interface: attribute violatedDirective
- SecurityPolicyViolationEvent interface: attribute originalPolicy
- SecurityPolicyViolationEvent interface: attribute sourceFile
- SecurityPolicyViolationEvent interface: attribute sample
- SecurityPolicyViolationEvent interface: attribute disposition
- SecurityPolicyViolationEvent interface: attribute statusCode
- SecurityPolicyViolationEvent interface: attribute lineNumber
- SecurityPolicyViolationEvent interface: attribute columnNumber
- SecurityPolicyViolationEvent must be primary interface of new SecurityPolicyViolationEvent("securitypolicyviolation")
- Stringification of new SecurityPolicyViolationEvent("securitypolicyviolation")
- SecurityPolicyViolationEvent interface: new SecurityPolicyViolationEvent("securitypolicyviolation") must inherit property "documentURI" with the proper type
- SecurityPolicyViolationEvent interface: new SecurityPolicyViolationEvent("securitypolicyviolation") must inherit property "referrer" with the proper type
- SecurityPolicyViolationEvent interface: new SecurityPolicyViolationEvent("securitypolicyviolation") must inherit property "blockedURI" with the proper type
- SecurityPolicyViolationEvent interface: new SecurityPolicyViolationEvent("securitypolicyviolation") must inherit property "effectiveDirective" with the proper type
- SecurityPolicyViolationEvent interface: new SecurityPolicyViolationEvent("securitypolicyviolation") must inherit property "violatedDirective" with the proper type
- SecurityPolicyViolationEvent interface: new SecurityPolicyViolationEvent("securitypolicyviolation") must inherit property "originalPolicy" with the proper type
- SecurityPolicyViolationEvent interface: new SecurityPolicyViolationEvent("securitypolicyviolation") must inherit property "sourceFile" with the proper type
- SecurityPolicyViolationEvent interface: new SecurityPolicyViolationEvent("securitypolicyviolation") must inherit property "sample" with the proper type
- SecurityPolicyViolationEvent interface: new SecurityPolicyViolationEvent("securitypolicyviolation") must inherit property "disposition" with the proper type
- SecurityPolicyViolationEvent interface: new SecurityPolicyViolationEvent("securitypolicyviolation") must inherit property "statusCode" with the proper type
- SecurityPolicyViolationEvent interface: new SecurityPolicyViolationEvent("securitypolicyviolation") must inherit property "lineNumber" with the proper type
- SecurityPolicyViolationEvent interface: new SecurityPolicyViolationEvent("securitypolicyviolation") must inherit property "columnNumber" with the proper type
img-src-redirect-upgrade-reporting.https.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Image that redirects to http:// URL prohibited by Report-Only must generate a violation report, even with upgrade-insecure-requests
img-src-redirect.sub.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- The blocked URI in the security policy violation event should be the original URI before redirects.
inside-dedicated-worker.html 3 / 3 passingChrome 3 / 30 failedClean
3 passing subtests
- No SecurityPolicyViolation event fired for successful load.
- SecurityPolicyViolation event fired on global.
- SecurityPolicyViolation event fired on global with the correct blockedURI.
inside-nested-dedicated-worker.html 0 / 1 passingChrome 0 / 10 failedExempt
Exempt from the 0.1 gate: Crane follows the browser majority
the inner module worker's cross-origin static import is checked against the inner worker's own CSP, not the outer worker's script-src 'self', so the outer worker sees no violation and the test times out, as in Chrome, Firefox and Safari
- Crane matches
- Chrome, Firefox, Safari
- Chrome
- wpt.fyi run 4786307730243584: 0/1 TIMEOUT (Chrome 157, 2358bd4835)
- Firefox
- wpt.fyi run 4877168468033536: 0/1 TIMEOUT (Firefox 160, 2358bd4835)
- Safari
- wpt.fyi run 6479119966273536: 0/1 TIMEOUT (Safari 27.2, 2358bd4835)
- Ruling
- golden rule 2, no newer spec: whatwg/html#9571 (Firefox and WebKit use the worker's settings for static descendants); the integrator, 2026-11-18 3:02 PM ET (lane csp1)
- Revisit
- when Chrome, Firefox or Safari changes its result on a newer aligned wpt.fyi run, or Crane's result moves
/content-security-policy/securitypolicyviolation/inside-nested-dedicated-worker.html TIMEOUT 0 / 1
- ¶
TIMEOUTCSP violation in nested worker fires securitypolicyviolation event on outer worker.
Test timed out
inside-service-worker.https.html 3 / 3 passingChrome 3 / 30 failedClean
3 passing subtests
- No SecurityPolicyViolation event fired for successful load.
- SecurityPolicyViolation event fired on global.
- SecurityPolicyViolation event fired on global with the correct blockedURI.
no-violation-for-inline-handler-in-document-without-browsing-context.html 5 / 5 passingChrome 0 / 50 failedClean
5 passing subtests
- DOMParser.parseFromString()
- DOMParser.parseFromString() with body onload
- template.innerHTML
- setAttribute() in template contents
- setAttribute() in a document created by createHTMLDocument()
object-src-multihop-redirect.sub.html 1 / 1 passingChrome 0 / 10 failedClean
1 passing subtest
- The blocked URI in the security policy violation event for an object element should be the original URI, not an intermediate one, after more than one redirect.
object-src-redirect.sub.html 1 / 1 passingChrome 0 / 10 failedClean
1 passing subtest
- The blocked URI in the security policy violation event for an object element should be the original URI before redirects.
script-sample-no-opt-in.html 4 / 4 passingChrome 4 / 40 failedClean
4 passing subtests
- Inline script should not have a sample.
- Inline event handlers should not have a sample.
- JavaScript URLs in iframes should not have a sample.
- eval()-alikes should not have a sample.
script-sample.html 6 / 6 passingChrome 6 / 60 failedClean
6 passing subtests
- Inline script should have a sample.
- Inline event handlers should have a sample.
- JavaScript URLs in iframes should have a sample.
- eval() should have a sample.
- setInterval() should have a sample.
- setTimeout() should have a sample.
securitypolicyviolation-block-cross-origin-image-from-script.sub.html 0 / 1 passingChrome 0 / 11 failedExempt
Exempt from the 0.1 gate: Crane follows the browser majority
for a cross-origin image, the same location assertion fails as in Safari, each with its JavaScript engine's [line, column] (Crane [2, 7], Safari [2, 2]); Firefox's is the test's; Chrome reports no location at all
- Crane matches
- Safari
- Chrome
- wpt.fyi run 4786307730243584: 0/1 (Chrome 157, 2358bd4835)
- Firefox
- wpt.fyi run 4877168468033536: 1/1 (Firefox 160, 2358bd4835)
- Safari
- wpt.fyi run 6479119966273536: 0/1 (Safari 27.2, 2358bd4835)
- Ruling
- the integrator's golden-rule-2 ruling, 2026-11-12 (lane quick1 C22): the request-time location as Firefox and Safari capture it; the [line, column] is the JavaScript engine's own
- Revisit
- when Chrome, Firefox or Safari changes its result on a newer aligned wpt.fyi run, or Crane's result moves, or when V8 ships a public statement-position API for a running frame (crbug 587981566, filed 2026-11-20 at the user's OK; the user ruled 2026-11-19: keep exempt + file it)
- ¶
FAILNon-redirected cross-origin URLs are not stripped.
assert_true: Location should be reasonable, got [2, 7] expected true got false
securitypolicyviolation-block-cross-origin-image.sub.html 0 / 1 passingChrome 0 / 11 failedExempt
Exempt from the 0.1 gate: Crane follows the browser majority
for a cross-origin image, the same column assertion fails as in Safari, each with its JavaScript engine's column (Crane 11, Safari 6); Firefox's is the test's; Chrome reports no location at all
- Crane matches
- Safari
- Chrome
- wpt.fyi run 4786307730243584: 0/1 (Chrome 157, 2358bd4835)
- Firefox
- wpt.fyi run 4877168468033536: 1/1 (Firefox 160, 2358bd4835)
- Safari
- wpt.fyi run 6479119966273536: 0/1 (Safari 27.2, 2358bd4835)
- Ruling
- the integrator's golden-rule-2 ruling, 2026-11-12 (lane quick1 C22): the request-time location as Firefox and Safari capture it; the column is the JavaScript engine's own
- Revisit
- when Chrome, Firefox or Safari changes its result on a newer aligned wpt.fyi run, or Crane's result moves, or when V8 ships a public statement-position API for a running frame (crbug 587981566, filed 2026-11-20 at the user's OK; the user ruled 2026-11-19: keep exempt + file it)
- ¶
FAILNon-redirected cross-origin URLs are not stripped.
assert_equals: expected 5 but got 11
securitypolicyviolation-block-image-from-script.sub.html 0 / 1 passingChrome 0 / 11 failedExempt
Exempt from the 0.1 gate: Crane follows the browser majority
the same location assertion fails as in Safari, each with its JavaScript engine's [line, column] (Crane [2, 7], Safari [2, 2]); Firefox's is the one the test expects; Chrome reports no location at all
- Crane matches
- Safari
- Chrome
- wpt.fyi run 4786307730243584: 0/1 (Chrome 157, 2358bd4835)
- Firefox
- wpt.fyi run 4877168468033536: 1/1 (Firefox 160, 2358bd4835)
- Safari
- wpt.fyi run 6479119966273536: 0/1 (Safari 27.2, 2358bd4835)
- Ruling
- the integrator's golden-rule-2 ruling, 2026-11-12 (lane quick1 C22): the request-time location as Firefox and Safari capture it; the [line, column] is the JavaScript engine's own
- Revisit
- when Chrome, Firefox or Safari changes its result on a newer aligned wpt.fyi run, or Crane's result moves, or when V8 ships a public statement-position API for a running frame (crbug 587981566, filed 2026-11-20 at the user's OK; the user ruled 2026-11-19: keep exempt + file it)
- ¶
FAILNon-redirected cross-origin URLs are not stripped.
assert_true: Location should be reasonable, got [2, 7] expected true got false
securitypolicyviolation-block-image.sub.html 0 / 1 passingChrome 0 / 11 failedExempt
Exempt from the 0.1 gate: Crane follows the browser majority
the same column assertion fails as in Safari, each with its JavaScript engine's column (Crane 11, Safari 6); Firefox's column is the one the test expects; Chrome reports no location at all and fails earlier
- Crane matches
- Safari
- Chrome
- wpt.fyi run 4786307730243584: 0/1 (Chrome 157, 2358bd4835)
- Firefox
- wpt.fyi run 4877168468033536: 1/1 (Firefox 160, 2358bd4835)
- Safari
- wpt.fyi run 6479119966273536: 0/1 (Safari 27.2, 2358bd4835)
- Ruling
- the integrator's golden-rule-2 ruling, 2026-11-12 (lane quick1 C22): the violation's location is captured when update the image data queues its microtask, as Firefox and Safari do; its column is the JavaScript engine's own (V8 11, JavaScriptCore 6, SpiderMonkey 5 = the test's), so no change in Crane's code gives SpiderMonkey's
- Revisit
- when Chrome, Firefox or Safari changes its result on a newer aligned wpt.fyi run, or Crane's result moves, or when V8 ships a public statement-position API for a running frame (crbug 587981566, filed 2026-11-20 at the user's OK; the user ruled 2026-11-19: keep exempt + file it)
- ¶
FAILNon-redirected same-origin URLs are not stripped.
assert_equals: expected 5 but got 11
source-file-blob-scheme.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Violations from data:-URL scripts have a sourceFile of 'blob'
source-file-data-scheme.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Violations from data:-URL scripts have a sourceFile of 'data'
source-file.html 16 / 17 passingChrome 17 / 171 failedWith failures
- ¶
FAILQuery
assert_equals: expected "https://dummy.test/script1.js" but got "https://dummy.test/script1.js?query"
16 passing subtests
- Basic HTTPS URL
- Basic HTTP URL
- Basic WSS URL
- Basic WS URL
- Fragment
- Port
- User:password
- User
- Invalid URL
- file:
- Custom protocol
- about:blank
- about:custom
- data:
- blob:
- javascript:
style-sample-no-opt-in.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Inline style blocks should not have a sample.
- Inline style attributes should not have a sample.
style-sample.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Inline style blocks should have a sample.
- Inline style attributes should have a sample.
targeting-for-inline-handler-connected-after-set.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- targeting-for-inline-handler-connected-after-set
targeting-for-inline-handler-in-markup-disconnected-after-set.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- targeting-for-inline-handler-in-markup-disconnected-after-set
targeting-for-inline-handler-in-markup-then-disconnected.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- targeting-for-inline-handler-in-markup-then-disconnected
- targeting-for-inline-handler-in-markup-then-disconnected 1
targeting-for-inline-handler-in-markup.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- targeting-for-inline-handler-in-markup
- targeting-for-inline-handler-in-markup 1
targeting-for-inline-handler-in-shadow-dom.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- targeting-for-inline-handler-in-shadow-dom
targeting-for-inline-handler-on-disconnected-element.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- targeting-for-inline-handler-on-disconnected-element
targeting-for-inline-handler-on-element-in-disconnected-document-fragment.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- targeting-for-inline-handler-on-element-in-disconnected-document-fragment
targeting-for-inline-handler-on-main-frame-element-moved-to-subframe.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- targeting-for-inline-handler-on-main-frame-element-moved-to-subframe
targeting-for-inline-handler-on-subframe-element.html 9 / 9 passingChrome 9 / 90 failedClean
9 passing subtests
- targeting-for-inline-handler-on-subframe-element
- assert_equals(e.blockedURI, "inline")
- assert_equals(e.lineNumber, 11)
- assert_in_array(e.columnNumber, [7, 19])
- assert_equals(e.target, d)
- assert_equals(e.blockedURI, "inline") 1
- assert_equals(e.lineNumber, 11) 1
- assert_in_array(e.columnNumber, [7, 19]) 1
- assert_equals(e.target, d) 1
targeting-for-inline-script-without-nonce.html 5 / 5 passingChrome 5 / 50 failedClean
5 passing subtests
- targeting-for-inline-script-without-nonce
- assert_equals(e.blockedURI, "inline")
- assert_equals(e.lineNumber, 20)
- assert_in_array(e.columnNumber, [1, 21])
- assert_equals(e.target, document.getElementById("target"))
targeting-for-inline-style-in-shadow-dom.html 9 / 9 passingChrome 9 / 90 failedClean
9 passing subtests
- targeting-for-inline-style-in-shadow-dom
- assert_equals(e.blockedURI, "inline")
- assert_equals(e.lineNumber, 12)
- assert_in_array(e.columnNumber, [12, 23])
- assert_equals(e.target, style)
- assert_equals(e.blockedURI, "inline") 1
- assert_equals(e.lineNumber, 12) 1
- assert_in_array(e.columnNumber, [12, 23]) 1
- assert_equals(e.target, document.getElementById("target"))
targeting-for-inline-style.html 5 / 5 passingChrome 5 / 50 failedClean
5 passing subtests
- targeting-for-inline-style
- assert_equals(e.blockedURI, "inline")
- assert_equals(e.lineNumber, 20)
- assert_in_array(e.columnNumber, [1, 20])
- assert_equals(e.target, document.getElementById("target"))
upgrade-insecure-requests-reporting.https.html 3 / 3 passingChrome 3 / 30 failedClean
3 passing subtests
- Upgraded image is reported
- Upgraded iframe is reported
- Navigated iframe is upgraded and reported
worklet-import-nested-cross-origin-blocked.https.sub.html 1 / 1 passingChrome 0 / 10 failedClean
1 passing subtest
- CSP violation on a nested import within a PaintWorklet module graph fetch dispatches a securitypolicyviolation event on the Document
worklet-import-report-only.https.sub.html 1 / 1 passingChrome 0 / 10 failedClean
1 passing subtest
- A CSP violation under report-only policy for a worklet's top-level module script dispatches one securitypolicyviolation event