Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: LayoutTests/http/tests/security/contentSecurityPolicy/resources/csp-header-is-sent.js

Issue 1142623002: Stop sending the 'CSP' header. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/frame/csp/CSPDirectiveList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 async_test(function(t) { 1 async_test(function(t) {
2 var xhr = new XMLHttpRequest(); 2 var xhr = new XMLHttpRequest();
3 xhr.onload = function () { 3 xhr.onload = function () {
4 t.step(function () { assert_true(xhr.status === 404); t.done(); }); 4 t.step(function () { assert_true(xhr.status === 404); t.done(); });
5 }; 5 };
6 // Send a request that returns 200 if and only if CSP header is present. 6 // Send a request that returns 200 if and only if CSP header is present.
7 xhr.open( 7 xhr.open(
8 "GET", 8 "GET",
9 "http://127.0.0.1:8000/security/contentSecurityPolicy/resources/test-csp -header.pl", 9 "http://127.0.0.1:8000/security/contentSecurityPolicy/resources/test-csp -header.pl",
10 true 10 true
11 ); 11 );
12 xhr.send(); 12 xhr.send();
13 }, 'CSP header is not sent on resource requests for which there is no policy.'); 13 }, 'CSP header is not sent on resource requests for which there is no policy.');
14 14
15 test(function() { 15 test(function() {
16 assert_true(typeof(script_loaded) !== "undefined"); 16 assert_true(typeof(script_loaded) === "undefined");
17 }, 'CSP header is sent on resource requests for which there is a policy.'); 17 }, 'CSP header is sent on resource requests for which there is a policy.');
Michael van Ouwerkerk 2015/05/15 12:50:06 Better update this message as well then.
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/csp/CSPDirectiveList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698