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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/common/form-submission.py

Issue 2143653006: Import wpt@c875b4212a473363afe8c09f012edf201386cb5b (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update W3CImportExpectations Created 4 years, 5 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/common/form-submission.py
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/common/form-submission.py b/third_party/WebKit/LayoutTests/imported/wpt/common/form-submission.py
index 78f96fe3145c6544f49229792a9267fa8bb0dae9..467875453c9dc64aac51add3f4a617d941820972 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/common/form-submission.py
+++ b/third_party/WebKit/LayoutTests/imported/wpt/common/form-submission.py
@@ -1,17 +1,10 @@
def main(request, response):
if request.headers.get('Content-Type') == 'application/x-www-form-urlencoded':
- if request.body == 'foo=bara':
- return 'OK'
- else:
- return 'FAIL'
+ result = request.body == 'foo=bara'
elif request.headers.get('Content-Type') == 'text/plain':
- if request.body == 'qux=baz\r\n':
- return 'OK'
- else:
- return 'FAIL'
+ result = request.body == 'qux=baz\r\n'
else:
- if request.POST.first('foo') == 'bar':
- return 'OK'
- else:
- return 'FAIL'
+ result = request.POST.first('foo') == 'bar'
+ return ([("Content-Type", "text/plain")],
+ "OK" if result else "FAIL")

Powered by Google App Engine
This is Rietveld 408576698