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

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

Issue 2110093002: Import wpt@00af177447b0a4b2de95f051b040290f7307acd3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wpt-rewrite-nopathhacks
Patch Set: Merge branch 'master' into wpt_import2 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 unified diff | Download patch
OLDNEW
1 def main(request, response): 1 def main(request, response):
2 if request.headers.get('Content-Type') == 'application/x-www-form-urlencoded ': 2 if request.headers.get('Content-Type') == 'application/x-www-form-urlencoded ':
3 if request.body == 'foo=bara': 3 result = request.body == 'foo=bara'
4 return 'OK'
5 else:
6 return 'FAIL'
7 elif request.headers.get('Content-Type') == 'text/plain': 4 elif request.headers.get('Content-Type') == 'text/plain':
8 if request.body == 'qux=baz\r\n': 5 result = request.body == 'qux=baz\r\n'
9 return 'OK'
10 else:
11 return 'FAIL'
12 else: 6 else:
13 if request.POST.first('foo') == 'bar': 7 result = request.POST.first('foo') == 'bar'
14 return 'OK'
15 else:
16 return 'FAIL'
17 8
9 return ([("Content-Type", "text/plain")],
10 "OK" if result else "FAIL")
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698