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

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

Issue 2872363002: Upstream service worker navigation tests to WPT (Closed)
Patch Set: Created 3 years, 7 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/external/wpt/service-workers/service-worker/resources/navigation-redirect-body.py
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/navigation-redirect-body.py b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/navigation-redirect-body.py
new file mode 100644
index 0000000000000000000000000000000000000000..601f818cff6ad47a2c232f4f0b127d756cb0f6c1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/navigation-redirect-body.py
@@ -0,0 +1,9 @@
+import os
+
+filename = os.path.basename(__file__)
+
+def main(request, response):
+ if request.method == 'POST':
+ return 302, [('Location', './%s?redirect' % filename)], ''
+
+ return [('Content-Type', 'text/plain')], request.request_path

Powered by Google App Engine
This is Rietveld 408576698