diff --git a/tests/wpt/include.ini b/tests/wpt/include.ini index b806365a66c..516c2fc79ea 100644 --- a/tests/wpt/include.ini +++ b/tests/wpt/include.ini @@ -12,18 +12,7 @@ skip: true [samesite] skip: true [content-security-policy] - [child-src] - skip: false - [connect-src] - skip: false - [default-src] - skip: false - [securitypolicyviolation] - skip: false - [unsafe-eval] - skip: false - [wasm-unsafe-eval] - skip: false + skip: false [cors] skip: false [css] diff --git a/tests/wpt/meta/content-security-policy/base-uri/base-uri-deny-url-encoded-host.sub.html.ini b/tests/wpt/meta/content-security-policy/base-uri/base-uri-deny-url-encoded-host.sub.html.ini new file mode 100644 index 00000000000..89c53bc50ce --- /dev/null +++ b/tests/wpt/meta/content-security-policy/base-uri/base-uri-deny-url-encoded-host.sub.html.ini @@ -0,0 +1,7 @@ +[base-uri-deny-url-encoded-host.sub.html] + expected: TIMEOUT + [Check that baseURI fires a securitypolicyviolation event when it does not match the csp directive due to a url encoded host character.] + expected: NOTRUN + + [Check that the baseURI is not set when it does not match the csp directive] + expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/base-uri/base-uri-deny.sub.html.ini b/tests/wpt/meta/content-security-policy/base-uri/base-uri-deny.sub.html.ini new file mode 100644 index 00000000000..0968c7cad44 --- /dev/null +++ b/tests/wpt/meta/content-security-policy/base-uri/base-uri-deny.sub.html.ini @@ -0,0 +1,7 @@ +[base-uri-deny.sub.html] + expected: TIMEOUT + [Check that baseURI fires a securitypolicyviolation event when it does not match the csp directive] + expected: NOTRUN + + [Check that the baseURI is not set when it does not match the csp directive] + expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/base-uri/base-uri_iframe_sandbox.sub.html.ini b/tests/wpt/meta/content-security-policy/base-uri/base-uri_iframe_sandbox.sub.html.ini new file mode 100644 index 00000000000..8a286ec5b93 --- /dev/null +++ b/tests/wpt/meta/content-security-policy/base-uri/base-uri_iframe_sandbox.sub.html.ini @@ -0,0 +1,7 @@ +[base-uri_iframe_sandbox.sub.html] + expected: TIMEOUT + [base-uri 'self' works with same-origin sandboxed iframes.] + expected: TIMEOUT + + [base-uri 'self' blocks foreign-origin sandboxed iframes.] + expected: TIMEOUT diff --git a/tests/wpt/meta/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html.ini b/tests/wpt/meta/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html.ini new file mode 100644 index 00000000000..e2f1b5fea4b --- /dev/null +++ b/tests/wpt/meta/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html.ini @@ -0,0 +1,10 @@ +[report-uri-does-not-respect-base-uri.sub.html] + expected: TIMEOUT + [Test that image does not load] + expected: NOTRUN + + [Event is fired] + expected: TIMEOUT + + [Violation report status OK.] + expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/blob/blob-urls-do-not-match-self.sub.html.ini b/tests/wpt/meta/content-security-policy/blob/blob-urls-do-not-match-self.sub.html.ini new file mode 100644 index 00000000000..7c4537daa5a --- /dev/null +++ b/tests/wpt/meta/content-security-policy/blob/blob-urls-do-not-match-self.sub.html.ini @@ -0,0 +1,6 @@ +[blob-urls-do-not-match-self.sub.html] + [Expecting logs: ["violated-directive=script-src-elem"\]] + expected: FAIL + + [blob-urls-do-not-match-self] + expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/blob/self-doesnt-match-blob.sub.html.ini b/tests/wpt/meta/content-security-policy/blob/self-doesnt-match-blob.sub.html.ini new file mode 100644 index 00000000000..07526d1f79e --- /dev/null +++ b/tests/wpt/meta/content-security-policy/blob/self-doesnt-match-blob.sub.html.ini @@ -0,0 +1,9 @@ +[self-doesnt-match-blob.sub.html] + [Expecting logs: ["violated-directive=worker-src","TEST COMPLETE"\]] + expected: FAIL + + [worker-connect-src-blocked] + expected: FAIL + + [worker-connect-src-blocked 1] + expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/blob/star-doesnt-match-blob.sub.html.ini b/tests/wpt/meta/content-security-policy/blob/star-doesnt-match-blob.sub.html.ini new file mode 100644 index 00000000000..179a42c0c69 --- /dev/null +++ b/tests/wpt/meta/content-security-policy/blob/star-doesnt-match-blob.sub.html.ini @@ -0,0 +1,3 @@ +[star-doesnt-match-blob.sub.html] + [Expecting logs: ["violated-directive=worker-src","TEST COMPLETE"\]] + expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/embedded-enforcement/allow_csp_from-header.html.ini b/tests/wpt/meta/content-security-policy/embedded-enforcement/allow_csp_from-header.html.ini new file mode 100644 index 00000000000..3cf8d56a5d6 --- /dev/null +++ b/tests/wpt/meta/content-security-policy/embedded-enforcement/allow_csp_from-header.html.ini @@ -0,0 +1,25 @@ +[allow_csp_from-header.html] + expected: TIMEOUT + [Same origin iframes with an empty Allow-CSP-From header get blocked.] + expected: FAIL + + [Same origin iframes without Allow-CSP-From header gets blocked.] + expected: FAIL + + [Same origin iframes are blocked if Allow-CSP-From does not match origin.] + expected: FAIL + + [Cross origin iframe with an empty Allow-CSP-From header gets blocked.] + expected: FAIL + + [Cross origin iframe without Allow-CSP-From header gets blocked.] + expected: FAIL + + [Iframe with improper Allow-CSP-From header gets blocked.] + expected: FAIL + + [Star Allow-CSP-From header enforces EmbeddingCSP.] + expected: TIMEOUT + + [Allow-CSP-From header enforces EmbeddingCSP.] + expected: TIMEOUT diff --git a/tests/wpt/meta/content-security-policy/embedded-enforcement/blocked-iframe-are-cross-origin.html.ini b/tests/wpt/meta/content-security-policy/embedded-enforcement/blocked-iframe-are-cross-origin.html.ini new file mode 100644 index 00000000000..31c147a6ece --- /dev/null +++ b/tests/wpt/meta/content-security-policy/embedded-enforcement/blocked-iframe-are-cross-origin.html.ini @@ -0,0 +1,6 @@ +[blocked-iframe-are-cross-origin.html] + [Document blocked by embedded enforcement and its parent are cross-origin] + expected: FAIL + + [Two same-origin iframes must appear as cross-origin when one is blocked] + expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/embedded-enforcement/change-csp-attribute-and-history-navigation.html.ini b/tests/wpt/meta/content-security-policy/embedded-enforcement/change-csp-attribute-and-history-navigation.html.ini new file mode 100644 index 00000000000..c8205878128 --- /dev/null +++ b/tests/wpt/meta/content-security-policy/embedded-enforcement/change-csp-attribute-and-history-navigation.html.ini @@ -0,0 +1,6 @@ +[change-csp-attribute-and-history-navigation.html] + [Iframe csp attribute changed before history navigation of local scheme.] + expected: FAIL + + [Iframe csp attribute changed before history navigation of network scheme.] + expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/embedded-enforcement/idlharness.window.js.ini b/tests/wpt/meta/content-security-policy/embedded-enforcement/idlharness.window.js.ini new file mode 100644 index 00000000000..551c76a0058 --- /dev/null +++ b/tests/wpt/meta/content-security-policy/embedded-enforcement/idlharness.window.js.ini @@ -0,0 +1,6 @@ +[idlharness.window.html] + [HTMLIFrameElement interface: attribute csp] + expected: FAIL + + [HTMLIFrameElement interface: document.createElement("iframe") must inherit property "csp" with the proper type] + expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/embedded-enforcement/iframe-csp-attribute.html.ini b/tests/wpt/meta/content-security-policy/embedded-enforcement/iframe-csp-attribute.html.ini new file mode 100644 index 00000000000..000df37abc1 --- /dev/null +++ b/tests/wpt/meta/content-security-policy/embedded-enforcement/iframe-csp-attribute.html.ini @@ -0,0 +1,12 @@ +[iframe-csp-attribute.html] + [