forked from mirrors/gecko-dev
Automatic update from web-platform-tests Python 3: Port tests in html/semantics/scripting-1 (#24164) * Python 3: Port tests in html/semantics/scripting-1 * Change type of "type" to unicode * Convert item type before passing to urlencode() -- wpt-commits: b6a67998c6c2827319726af3bea65e572b5a125a wpt-pr: 24164
13 lines
344 B
Python
13 lines
344 B
Python
import time
|
|
|
|
def main(request, response):
|
|
response.headers.append(b"Content-Type", b"text/javascript")
|
|
try:
|
|
script_id = int(request.GET.first(b"id"))
|
|
delay = int(request.GET.first(b"sec"))
|
|
except:
|
|
response.set_error(400, u"Invalid parameter")
|
|
|
|
time.sleep(int(delay))
|
|
|
|
return u"log('%s')" % script_id
|