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); |