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

Unified Diff: LayoutTests/http/tests/css/resources/referrer-check.php

Issue 304603006: Revert of Set proper referrer for css resource fetching (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/css/resources/referrer-check.php
diff --git a/LayoutTests/http/tests/css/resources/referrer-check.php b/LayoutTests/http/tests/css/resources/referrer-check.php
deleted file mode 100644
index 2e8b00ba818e77b386df4f3883d0c25552e5e5e8..0000000000000000000000000000000000000000
--- a/LayoutTests/http/tests/css/resources/referrer-check.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-function getReferrerPath() {
- if (!isset($_SERVER["HTTP_REFERER"]))
- return "";
- $url = parse_url($_SERVER["HTTP_REFERER"]);
- return $url['path'];
-}
-
-function putImage() {
- $image = "../../resources/square100.png";
- header("Content-Type: image/png");
- header("Content-Length: " . filesize($image));
- header("Access-Control-Allow-Origin: *");
- ob_clean();
- flush();
- readfile($image);
-}
-
-function putFont() {
- $font = "../../../../resources/Ahem.ttf";
- header("Content-Type: font/truetype");
- header("Content-Length: " . filesize($font));
- header("Access-Control-Allow-Origin: *");
- ob_clean();
- flush();
- readfile($font);
-}
-
-$expectedReferrerPaths = array(
- "document" => "/css/css-resources-referrer.html",
- "sheet" => "/css/resources/css-resources-referrer.css",
- "importedSheet" => "/css/resources/css-resources-referrer-import.css",
- "iframe" => "/from/iframe.html"
-);
-
-$from = $_GET["from"];
-$resource = $_GET["resource"];
-$referrerPath = getReferrerPath();
-
-if ($referrerPath === $expectedReferrerPaths[$from]) {
- if ($resource === "image" || $resource === "image2")
- putImage();
- else if ($resource === "font")
- putFont();
- else
- header("HTTP/1.1 500 Internal Server Error");
-} else {
- header("HTTP/1.1 500 Internal Server Error");
-}
-
-?>
« no previous file with comments | « LayoutTests/http/tests/css/resources/css-resources-referrer-import.css ('k') | Source/core/css/CSSCursorImageValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698