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

Side by Side Diff: LayoutTests/http/tests/security/contentSecurityPolicy/resources/worker.php

Issue 1117203002: Enforce referrer policies for workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix layout test indentation 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 | LayoutTests/http/tests/security/referrer-policy-worker-has-referrer.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <?php 1 <?php
2 header("Expires: Thu, 01 Dec 2003 16:00:00 GMT"); 2 header("Expires: Thu, 01 Dec 2003 16:00:00 GMT");
3 header("Cache-Control: no-cache, must-revalidate"); 3 header("Cache-Control: no-cache, must-revalidate");
4 header("Pragma: no-cache"); 4 header("Pragma: no-cache");
5 if ($_GET["csp"]) { 5 if ($_GET["csp"]) {
6 $csp = $_GET["csp"]; 6 $csp = $_GET["csp"];
7 // If the magic quotes option is enabled, the CSP could be escaped and 7 // If the magic quotes option is enabled, the CSP could be escaped and
8 // the test would fail. 8 // the test would fail.
9 if (get_magic_quotes_gpc()) { 9 if (get_magic_quotes_gpc()) {
10 $csp = stripslashes($csp); 10 $csp = stripslashes($csp);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 postMessage(id === 0 ? "setTimeout blocked" : "setTimeout allowed"); 75 postMessage(id === 0 ? "setTimeout blocked" : "setTimeout allowed");
76 76
77 <?php 77 <?php
78 } else if ($_GET["type"] == "alert-pass") { 78 } else if ($_GET["type"] == "alert-pass") {
79 ?> 79 ?>
80 80
81 alert('PASS'); 81 alert('PASS');
82 82
83 <?php 83 <?php
84 } else if ($_GET["type"] == "report-referrer") {
85 ?>
86
87 var xhr = new XMLHttpRequest;
88 xhr.open("GET", "http://127.0.0.1:8000/security/resources/echo-referrer-header.p hp", true);
89 xhr.onload = function () {
90 postMessage(this.responseText);
91 };
92 xhr.send();
93
94 <?php
84 } 95 }
85 ?> 96 ?>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/referrer-policy-worker-has-referrer.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698