Update web-platform-tests to revision d7afcb8708eac08a614d161d5622a48172daf7e3

This commit is contained in:
WPT Sync Bot 2019-05-15 10:40:54 -04:00 committed by Josh Matthews
parent 6f8bb4dd40
commit edff458e23
791 changed files with 17647 additions and 10322 deletions

View file

@ -0,0 +1,28 @@
def main(request, response):
token = request.GET.first("token", None)
is_query = request.GET.first("query", None) != None
with request.server.stash.lock:
value = request.server.stash.take(token)
count = 0
if value != None:
count = int(value)
if is_query:
if count < 2:
request.server.stash.put(token, count)
else:
count = count + 1
request.server.stash.put(token, count)
if is_query:
headers = [("Count", count)]
content = ""
return 200, headers, content
else:
content = "body { background: rgb(0, 128, 0); }"
if count > 1:
content = "body { background: rgb(255, 0, 0); }"
headers = [("Content-Type", "text/css"),
("Cache-Control", "private, max-age=0, stale-while-revalidate=60")]
return 200, headers, content