Backed out changeset 98267962a9a7 (bug 1291320)

This commit is contained in:
Sebastian Hengst 2017-03-29 00:31:00 +02:00
Родитель 808ec675be
Коммит 2fd692d1a3
1 изменённых файлов: 4 добавлений и 13 удалений

Просмотреть файл

@ -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):