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

Unified Diff: LayoutTests/http/tests/security/resources/green-if-cors-credentialed.php

Issue 1011103002: Allow cross-origin cssRules access to CORS-fetched stylesheet. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: compile fix.. 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/security/resources/green-if-cors-credentialed.php
diff --git a/LayoutTests/http/tests/security/resources/webaudio/media-element-cross-origin-allow.php b/LayoutTests/http/tests/security/resources/green-if-cors-credentialed.php
similarity index 55%
copy from LayoutTests/http/tests/security/resources/webaudio/media-element-cross-origin-allow.php
copy to LayoutTests/http/tests/security/resources/green-if-cors-credentialed.php
index 3fa058ceeb005431eff7e2e25aa1c5a24663ba98..2c8a1bc01af68f2931538446e2beb6788ad1e3f5 100644
--- a/LayoutTests/http/tests/security/resources/webaudio/media-element-cross-origin-allow.php
+++ b/LayoutTests/http/tests/security/resources/green-if-cors-credentialed.php
@@ -1,16 +1,14 @@
<?php
-
-if (isset($_GET['with_credentials'])) {
- header("Access-Control-Allow-Origin: http://127.0.0.1:8000");
+if (isset($_SERVER['HTTP_ORIGIN']) && $_COOKIE['cookie'] != '') {
+ header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Credentials: true");
+ $name = 'green-background.css';
} else {
- header("Access-Control-Allow-Origin: *");
+ $name = 'red-background.css';
}
-$name = 'laughter.wav';
$fp = fopen($name, 'rb');
-
-header("Content-Type: audio/x-wav");
+header("Content-Type: text/css");
header("Content-Length: " . filesize($name));
fpassthru($fp);

Powered by Google App Engine
This is Rietveld 408576698