From 02297791c875bd4326c5782fc4db45d091b29084 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 28 Jul 2025 09:45:54 -0400 Subject: [PATCH] chore: Add test for synthesized image documents with CSP headers. (#38191) Adds a regression test for https://github.com/servo/servo/pull/38186, verifying that the CSP header on the image is ignored when it's loaded as a document. --------- Signed-off-by: Josh Matthews --- tests/wpt/meta/MANIFEST.json | 29 ++++++++++++++++++ .../image-document-ignores-csp-ref.html | 3 ++ .../generic/image-document-ignores-csp.html | 7 +++++ .../content-security-policy/support/pass3.png | Bin 0 -> 1689 bytes .../support/pass3.png.headers | 1 + 5 files changed, 40 insertions(+) create mode 100644 tests/wpt/tests/content-security-policy/generic/image-document-ignores-csp-ref.html create mode 100644 tests/wpt/tests/content-security-policy/generic/image-document-ignores-csp.html create mode 100644 tests/wpt/tests/content-security-policy/support/pass3.png create mode 100644 tests/wpt/tests/content-security-policy/support/pass3.png.headers diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json index a397fc7ca87..e6d1c7c264f 100644 --- a/tests/wpt/meta/MANIFEST.json +++ b/tests/wpt/meta/MANIFEST.json @@ -39126,6 +39126,23 @@ ] ] }, + "content-security-policy": { + "generic": { + "image-document-ignores-csp.html": [ + "a3f6f64854d98d40c8c405831d6f3f9656fdf34d", + [ + null, + [ + [ + "/content-security-policy/generic/image-document-ignores-csp-ref.html", + "==" + ] + ], + {} + ] + ] + } + }, "contenteditable": { "synthetic-height.html": [ "4d466bff412e6de924b9886ef808b49f7ff2b44d", @@ -401739,6 +401756,10 @@ "5c580273dcfc94eff137a0ae65314bebc9b7b5c0", [] ], + "image-document-ignores-csp-ref.html": [ + "e0747fd6c2810ccd771c5e33795d8c46ba56ff6c", + [] + ], "negativeTests.js": [ "44b4d7f683d8fb674a3c2b5d22eb8ea9d7b31ada", [] @@ -402755,6 +402776,14 @@ "2fa1e0ac0663a65deae6602621521cc2844b93de", [] ], + "pass3.png": [ + "2fa1e0ac0663a65deae6602621521cc2844b93de", + [] + ], + "pass3.png.headers": [ + "6581fd425ed9da6b6273d1eefb84ea9ac9ac6e53", + [] + ], "ping.js": [ "750ae45f969491ea29eaa47c85f96f97d94b415f", [] diff --git a/tests/wpt/tests/content-security-policy/generic/image-document-ignores-csp-ref.html b/tests/wpt/tests/content-security-policy/generic/image-document-ignores-csp-ref.html new file mode 100644 index 00000000000..e0747fd6c28 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/generic/image-document-ignores-csp-ref.html @@ -0,0 +1,3 @@ + + +