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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/redirect.php

Issue 2763123002: Upstream service worker `claim` tests to WPT (Closed)
Patch Set: Persist Chromium-specific version of test Created 3 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: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/redirect.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/redirect.php b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/redirect.php
new file mode 100644
index 0000000000000000000000000000000000000000..7a24a5fe60e2b571fcd08bae43820c0e340eea92
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/redirect.php
@@ -0,0 +1,29 @@
+<?php
+if ($_SERVER['REQUEST_METHOD'] !== 'OPTIONS') {
+ $url = $_GET['Redirect'];
+ if ($url != "noLocation") {
+ header("Location: $url");
+ }
+ if (isset($_GET['Status'])) {
+ header("HTTP/1.1 " . $_GET["Status"]);
+ } else {
+ header("HTTP/1.1 302");
+ }
+}
+if (isset($_GET['ACAOrigin'])) {
+ $origins = explode(',', $_GET['ACAOrigin']);
+ for ($i = 0; $i < sizeof($origins); ++$i)
+ header("Access-Control-Allow-Origin: " . $origins[$i], false);
+}
+if (isset($_GET['ACAHeaders']))
+ header("Access-Control-Allow-Headers: {$_GET['ACAHeaders']}");
+if (isset($_GET['ACAMethods']))
+ header("Access-Control-Allow-Methods: {$_GET['ACAMethods']}");
+if (isset($_GET['ACACredentials']))
+ header("Access-Control-Allow-Credentials: {$_GET['ACACredentials']}");
+if (isset($_GET['ACEHeaders']))
+ header("Access-Control-Expose-Headers: {$_GET['ACEHeaders']}");
+if (isset($_GET['NoRedirectTest'])) {
+ echo "report({jsonpResult:'noredirect'});";
+}
+?>

Powered by Google App Engine
This is Rietveld 408576698