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

Unified Diff: LayoutTests/http/tests/security/resources/green-if-cors-anonymous.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-anonymous.php
diff --git a/LayoutTests/http/tests/security/resources/green-if-cors-anonymous.php b/LayoutTests/http/tests/security/resources/green-if-cors-anonymous.php
new file mode 100644
index 0000000000000000000000000000000000000000..7553fe0c8e7b0a4c266f614f00ad5e8dbe7df134
--- /dev/null
+++ b/LayoutTests/http/tests/security/resources/green-if-cors-anonymous.php
@@ -0,0 +1,15 @@
+<?php
+if (isset($_SERVER['HTTP_ORIGIN']) && !isset($_COOKIE['cookie'])) {
+ header("Access-Control-Allow-Origin: *");
+ $name = 'green-background.css';
+} else {
+ $name = 'red-background.css';
+}
+
+$fp = fopen($name, 'rb');
+header("Content-Type: text/css");
+header("Content-Length: " . filesize($name));
+
+fpassthru($fp);
+exit;
+?>

Powered by Google App Engine
This is Rietveld 408576698