зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 98267962a9a7 (bug 1291320)
This commit is contained in:
Родитель
808ec675be
Коммит
2fd692d1a3
|
@ -32,19 +32,10 @@ def upload_handler(request, response):
|
|||
|
||||
@handlers.handler
|
||||
def slow_loading_document(request, response):
|
||||
# Allow the test specify the delay for delivering the content
|
||||
params = dict(urlparse.parse_qsl(request.url_parts.query))
|
||||
delay = int(params.get('delay', 5))
|
||||
time.sleep(delay)
|
||||
|
||||
# Do not allow the page to be cached to circumvent the bfcache of the browser
|
||||
response.headers.set("Cache-Control", "no-cache, no-store")
|
||||
response.content = """<!doctype html>
|
||||
<meta charset="UTF-8">
|
||||
<title>Slow page loading</title>
|
||||
|
||||
<p>Delay: <span id="delay">{}</span></p>
|
||||
""".format(delay)
|
||||
time.sleep(5)
|
||||
return """<!doctype html>
|
||||
<title>ok</title>
|
||||
<p>ok"""
|
||||
|
||||
|
||||
class NotAliveError(Exception):
|
||||
|
|
Загрузка…
Ссылка в новой задаче