OLD | NEW |
| (Empty) |
1 async_test(function(t) { | |
2 var xhr = new XMLHttpRequest(); | |
3 xhr.onload = function () { | |
4 t.step(function () { assert_true(xhr.status === 404); t.done(); }); | |
5 }; | |
6 // Send a request that returns 200 if and only if CSP header is present. | |
7 xhr.open( | |
8 "GET", | |
9 "http://127.0.0.1:8000/security/contentSecurityPolicy/resources/test-csp
-header.pl", | |
10 true | |
11 ); | |
12 xhr.send(); | |
13 }, 'CSP header is not sent on resource requests for which there is no policy.'); | |
14 | |
15 test(function() { | |
16 assert_true(typeof(script_loaded) !== "undefined"); | |
17 }, 'CSP header is sent on resource requests for which there is a policy.'); | |
OLD | NEW |