mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add tests for submit entity body
This commit is contained in:
parent
16361086d9
commit
e1091128cd
3 changed files with 62 additions and 0 deletions
12
tests/wpt/web-platform-tests/common/form-submission.py
Normal file
12
tests/wpt/web-platform-tests/common/form-submission.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
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'
|
||||
else:
|
||||
if request.POST.first('foo') == 'bar':
|
||||
return 'OK'
|
||||
else:
|
||||
return 'FAIL'
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue