mirror of
https://github.com/servo/servo.git
synced 2025-06-23 16:44:33 +01:00
13 lines
396 B
JavaScript
13 lines
396 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(test, new TypeError(), fetch(cspViolationUrl));
|
|
}, "Fetch is blocked by CSP, got a TypeError");
|
|
|
|
done();
|