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

Unified Diff: LayoutTests/http/tests/resources/origin.php

Issue 201143002: Update image data upon changing the img.crossorigin attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix underlying script Created 6 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/resources/origin.php
diff --git a/LayoutTests/http/tests/resources/origin.php b/LayoutTests/http/tests/resources/origin.php
index 5a34e3add306dbde64ed6a3d30e86ee8087f6b9c..7177cb3849b88cf30cb55a2c64d890d61e554420 100644
--- a/LayoutTests/http/tests/resources/origin.php
+++ b/LayoutTests/http/tests/resources/origin.php
@@ -1,16 +1,4 @@
<?php
-
-$gotOrigin = 0;
-foreach (getallheaders() as $name => $value) {
- if ($name == "Origin") {
- $gotOrigin = 1;
- }
-}
-
-if ($gotOrigin) {
- header('Location: square100.png');
-}
-else {
- header('Location: square200.png');
-}
-header('HTTP/1.1 302 Redirect');
+header('HTTP/1.1 302 Found');
+header('Location: ' . ($_SERVER['HTTP_ORIGIN'] ? 'square100.png' : 'square200.png'));
+?>
« no previous file with comments | « LayoutTests/http/tests/images/image-with-origin-header-expected.txt ('k') | Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698