mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision 8ae1ddbc812733c3a73b103eafad56fb43a2f4b5
This commit is contained in:
parent
d44e9aced2
commit
0e5e5db397
109 changed files with 2053 additions and 708 deletions
|
@ -0,0 +1,20 @@
|
|||
def main(request, response):
|
||||
|
||||
cookie = request.cookies.first("Count", None)
|
||||
count = 0
|
||||
if cookie != None:
|
||||
count = int(cookie.value)
|
||||
if request.GET.first("query", None) != None:
|
||||
headers = [("Count", count)]
|
||||
content = ""
|
||||
return 200, headers, content
|
||||
else:
|
||||
count = count + 1
|
||||
content = "body { background: rgb(0, 128, 0); }"
|
||||
if count > 1:
|
||||
content = "body { background: rgb(255, 0, 0); }"
|
||||
|
||||
headers = [("Content-Type", "text/css"),
|
||||
("Set-Cookie", "Count={}".format(count)),
|
||||
("Cache-Control", "private, max-age=0, stale-while-revalidate=10")]
|
||||
return 200, headers, content
|
Loading…
Add table
Add a link
Reference in a new issue