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

Unified Diff: LayoutTests/http/tests/w3c/webperf/resources/multi_redirect.php

Issue 13912021: [Resource Timing] Expose redirect timing information (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaseline Created 7 years, 6 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_redirect.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/w3c/webperf/resources/multi_redirect.php
diff --git a/LayoutTests/http/tests/w3c/webperf/resources/multi_redirect.php b/LayoutTests/http/tests/w3c/webperf/resources/multi_redirect.php
new file mode 100644
index 0000000000000000000000000000000000000000..b9468f13425fbf7ccdbb408d0eeac360d8ddf1cd
--- /dev/null
+++ b/LayoutTests/http/tests/w3c/webperf/resources/multi_redirect.php
@@ -0,0 +1,31 @@
+<?php
+ $step = $_GET["step"] ? $_GET["step"] : 1;
+ $pageOrigin = $_GET["pageOrigin"];
+ $crossOrigin = $_GET["crossOrigin"];
+ $timingAllow = $_GET["timingAllow"] ? $_GET["timingAllow"] : 0;
+ $redirectURL = "/w3c/webperf/resources/multi_redirect.php?pageOrigin=$pageOrigin&crossOrigin=$crossOrigin&timingAllow=$timingAllow";
+
+ switch ($step) {
+ case 1:
+ $redirectURL = $crossOrigin . $redirectURL . "&step=2";
+ if ($timingAllow != "0")
+ header("timing-allow-origin: $pageOrigin");
+ break;
+ case 2:
+ $redirectURL = $pageOrigin . $redirectURL . "&step=3";
+ if ($timingAllow != "0")
+ header("timing-allow-origin: $pageOrigin");
+ break;
+ case 3:
+ $redirectURL = $pageOrigin . "/w3c/webperf/resources/blank_page_green.htm";
+
+ break;
+ default:
+ break;
+ }
+
+ header("HTTP/1.1 302");
+ header("Location: $redirectURL");
+ sleep(1);
+ exit;
+?>
« no previous file with comments | « no previous file | LayoutTests/http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_redirect.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698