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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/fetch/api/resources/method.py

Issue 2778753002: Import //fetch from Web Platform Tests. (Closed)
Patch Set: Baselines. 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/external/wpt/fetch/api/resources/method.py
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/resources/method.py b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/resources/method.py
new file mode 100644
index 0000000000000000000000000000000000000000..db234f9d123fceed16081b6afada3bdda071d3a8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/resources/method.py
@@ -0,0 +1,11 @@
+def main(request, response):
+ headers = []
+ if "cors" in request.GET:
+ headers.append(("Access-Control-Allow-Origin", "*"))
+ headers.append(("Access-Control-Allow-Credentials", "true"))
+ headers.append(("Access-Control-Allow-Methods", "GET, POST, PUT, FOO"))
+ headers.append(("Access-Control-Allow-Headers", "x-test, x-foo"))
+ headers.append(("Access-Control-Expose-Headers", "x-request-method"))
+
+ headers.append(("x-request-method", request.method))
+ return headers, request.body

Powered by Google App Engine
This is Rietveld 408576698