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

Side by Side Diff: LayoutTests/http/tests/security/resources/cors-script.php

Issue 954233003: Enable SRI only for same origin and CORS content. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed test failures Created 5 years, 9 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/resources/cors-style.php » ('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 if (strtolower($_GET["cors"]) != "false") { 2 if (strtolower($_GET["cors"]) != "false") {
3 header("Access-Control-Allow-Origin: http://127.0.0.1:8000"); 3 header("Access-Control-Allow-Origin: http://127.0.0.1:8000");
4 } 4 }
5 if (strtolower($_GET["credentials"]) == "true") { 5 if (strtolower($_GET["credentials"]) == "true") {
6 header("Access-Control-ALlow-Credentials: true"); 6 header("Access-Control-Allow-Credentials: true");
7 } 7 }
8 header("Content-Type: application/javascript"); 8 header("Content-Type: application/javascript");
9 $delay = $_GET['delay']; 9 $delay = $_GET['delay'];
10 if ($delay) 10 if ($delay)
11 usleep(1000 * $delay); 11 usleep(1000 * $delay);
12 $value = $_GET['value']; 12 $value = $_GET['value'];
13 if ($_SERVER['HTTP_ORIGIN'] && $_GET['value_cors']) { 13 if ($_SERVER['HTTP_ORIGIN'] && $_GET['value_cors']) {
14 $value = $_GET['value_cors']; 14 $value = $_GET['value_cors'];
15 } 15 }
16 if ($value) 16 if ($value)
17 echo "result = \"" . $value . "\";"; 17 echo "result = \"" . $value . "\";";
18 else if (strtolower($_GET["fail"]) == "true") 18 else if (strtolower($_GET["fail"]) == "true")
19 echo "throw({toString: function(){ return 'SomeError' }});"; 19 echo "throw({toString: function(){ return 'SomeError' }});";
20 else 20 else
21 echo "alert('script ran.');"; 21 echo "alert('script ran.');";
22 ?> 22 ?>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/resources/cors-style.php » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698