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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/resources/navigation-redirect-scope2.py

Issue 2415873002: Import w3c tests for the service workers (Closed)
Patch Set: Rebase Created 4 years, 2 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/imported/wpt/service-workers/service-worker/resources/navigation-redirect-scope2.py
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/resources/navigation-redirect-scope2.py b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/resources/navigation-redirect-scope2.py
new file mode 100644
index 0000000000000000000000000000000000000000..4b40762d89ff05ae56f2a48a2295c47454dc3392
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/resources/navigation-redirect-scope2.py
@@ -0,0 +1,15 @@
+def main(request, response):
+ if "url" in request.GET:
+ headers = [("Location", request.GET["url"])]
+ return 302, headers, ''
+
+ return [], '''
+<!DOCTYPE html>
+<script>
+ window.parent.postMessage(
+ {
+ id: 'last_url',
+ result: location.href
+ }, '*');
+</script>
+'''

Powered by Google App Engine
This is Rietveld 408576698