Run subset of CSP tests by default. (#36402)

This will establish a baseline for the changes from #36363.

Testing: New tests in CI.
Fixes: Part of #4577

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-04-08 10:46:25 -04:00 committed by GitHub
parent 95eedb997a
commit ce4ca9ee98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 333 additions and 0 deletions

View file

@ -0,0 +1,3 @@
[connect-src-beacon-allowed.sub.html]
[Expecting logs: ["Pass"\]]
expected: NOTRUN

View file

@ -0,0 +1,3 @@
[connect-src-beacon-blocked.sub.html]
[Expecting logs: ["Pass", "violated-directive=connect-src"\]]
expected: NOTRUN

View file

@ -0,0 +1,3 @@
[connect-src-beacon-redirect-to-blocked.sub.html]
[Expecting logs: ["violated-directive=connect-src"\]]
expected: NOTRUN

View file

@ -0,0 +1,3 @@
[connect-src-eventsource-blocked.sub.html]
[Expecting logs: ["blocked","violated-directive=connect-src"\]]
expected: FAIL

View file

@ -0,0 +1,3 @@
[connect-src-eventsource-redirect-to-blocked.sub.html]
[Expecting logs: ["PASS EventSource() did not follow the disallowed redirect.","TEST COMPLETE", "violated-directive=connect-src"\]]
expected: FAIL

View file

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

View file

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

View file

@ -0,0 +1,3 @@
[connect-src-syncxmlhttprequest-blocked.sub.html]
[Expecting logs: ["Pass","violated-directive=connect-src"\]]
expected: FAIL

View file

@ -0,0 +1,3 @@
[connect-src-syncxmlhttprequest-redirect-to-blocked.sub.html]
[Expecting logs: ["PASS Sync XMLHttpRequest.send() did not follow the disallowed redirect.","TEST COMPLETE","violated-directive=connect-src"\]]
expected: FAIL

View file

@ -0,0 +1,3 @@
[connect-src-websocket-blocked.sub.html]
[Expecting logs: ["blocked","violated-directive=connect-src"\]]
expected: FAIL

View file

@ -0,0 +1,3 @@
[connect-src-xmlhttprequest-blocked.sub.html]
[Expecting logs: ["Pass","violated-directive=connect-src"\]]
expected: FAIL

View file

@ -0,0 +1,3 @@
[connect-src-xmlhttprequest-redirect-to-blocked.sub.html]
[Expecting logs: ["PASS XMLHttpRequest.send() did not follow the disallowed redirect.","TEST COMPLETE","violated-directive=connect-src"\]]
expected: FAIL

View file

@ -0,0 +1,4 @@
[shared-worker-connect-src-allowed.sub.html]
expected: ERROR
[Expecting logs: ["xhr allowed","TEST COMPLETE"\]]
expected: FAIL

View file

@ -0,0 +1,3 @@
[shared-worker-connect-src-blocked.sub.html]
[Expecting logs: ["xhr blocked","TEST COMPLETE"\]]
expected: NOTRUN

View file

@ -0,0 +1,3 @@
[worker-connect-src-blocked.sub.html]
[Expecting logs: ["xhr blocked","TEST COMPLETE"\]]
expected: FAIL

View file

@ -0,0 +1,3 @@
[worker-from-guid.sub.html]
[Expecting logs: ["violated-directive=connect-src","xhr blocked","TEST COMPLETE"\]]
expected: FAIL