1
0
Fork 0
firefox/testing/web-platform/tests/fetch/api/policies/csp-blocked.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

13 lines
393 B
JavaScript

if (this.document === undefined) {
importScripts("/resources/testharness.js");
importScripts("../resources/utils.js");
}
//Content-Security-Policy: connect-src 'none'; cf .headers file
cspViolationUrl = RESOURCES_DIR + "top.txt";
promise_test(function(test) {
return promise_rejects_js(test, TypeError, fetch(cspViolationUrl));
}, "Fetch is blocked by CSP, got a TypeError");
done();