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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/navigation-redirect-scope1.php

Issue 1286153003: Add LayoutTests for the behavior of navigation redirect with Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated falken's comment Created 5 years, 4 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/serviceworker/resources/navigation-redirect-scope1.php
diff --git a/LayoutTests/http/tests/serviceworker/resources/navigation-redirect-scope1.php b/LayoutTests/http/tests/serviceworker/resources/navigation-redirect-scope1.php
new file mode 100644
index 0000000000000000000000000000000000000000..a6fcc1ac8dc4c200f48e856d728b9b2ea1a24b6e
--- /dev/null
+++ b/LayoutTests/http/tests/serviceworker/resources/navigation-redirect-scope1.php
@@ -0,0 +1,17 @@
+<?php
+if (isset($_GET['url'])) {
+ header("HTTP/1.1 302");
+ $url = $_GET['url'];
+ header("Location: $url");
+ exit;
+}
+?>
+<!DOCTYPE html>
+<script>
+ window.parent.postMessage(
+ {
+ id: 'last_url',
+ result: location.href
+ },
+ 'http://127.0.0.1:8000');
+</script>

Powered by Google App Engine
This is Rietveld 408576698