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

Side by Side Diff: LayoutTests/http/tests/security/contentSecurityPolicy/resources/frame-ancestors-and-x-frame-options.pl

Issue 1326823003: CSP: 'frame-ancestors' should override 'x-frame-options'. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 #!/usr/bin/perl 1 #!/usr/bin/perl
2 use strict; 2 use strict;
3 use CGI; 3 use CGI;
4 4
5 my $cgi = new CGI; 5 my $cgi = new CGI;
6 6
7 print "Content-Type: text/html; charset=UTF-8\n"; 7 print "Content-Type: text/html; charset=UTF-8\n";
8 print "Content-Security-Policy: frame-ancestors " . $cgi->param("policy") . "\n\ n"; 8 print "Content-Security-Policy: frame-ancestors " . $cgi->param("policy") . "\n" ;
9 print "X-Frame-Options: " . $cgi->param("xfo") . "\n\n";
estark 2015/09/08 18:15:47 Confusion: when $cgi->param("xfo") is empty, how d
estark 2015/09/08 18:18:20 Oh wait, duh, it will only hit the ASSERT_NOT_REAC
9 10
10 print "<!DOCTYPE html>\n"; 11 print "<!DOCTYPE html>\n";
11 print "<html>\n"; 12 print "<html>\n";
12 print "<body>\n"; 13 print "<body>\n";
13 print " <p>This is an IFrame sending a Content Security Policy header contain ing \"frame-ancestors " . $cgi->param("policy") . "\".</p>\n"; 14 print " <p>This is an IFrame sending a Content Security Policy header contain ing \"frame-ancestors " . $cgi->param("policy") . "\" and \"X-Frame-Options: " . $cgi->param("xfo") . "\".</p>\n";
14 print "</body>\n"; 15 print "</body>\n";
15 print "</html>\n"; 16 print "</html>\n";
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698