Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/clear-site-data/support/echo-clear-site-data.py

Issue 2975463002: Enable Clear-Site-Data web platform tests. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/external/wpt/clear-site-data/navigation.https.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import json 1 import json
2 2
3 RESPONSE = """ 3 RESPONSE = """
4 <!DOCTYPE html> 4 <!DOCTYPE html>
5 <html> 5 <html>
6 <head> 6 <head>
7 <title>Clear-Site-Data</title> 7 <title>Clear-Site-Data</title>
8 <script src="test_utils.js"></script> 8 <script src="test_utils.js"></script>
9 </head> 9 </head>
10 <body> 10 <body>
(...skipping 16 matching lines...) Expand all
27 </html> 27 </html>
28 """ 28 """
29 29
30 # A support server that receives a list of datatypes in the GET query 30 # A support server that receives a list of datatypes in the GET query
31 # and returns a Clear-Site-Data header with those datatypes. The content 31 # and returns a Clear-Site-Data header with those datatypes. The content
32 # of the response is a html site using postMessage to report the status 32 # of the response is a html site using postMessage to report the status
33 # of the datatypes, so that if used in an iframe, it can inform the 33 # of the datatypes, so that if used in an iframe, it can inform the
34 # embedder whether the data deletion succeeded. 34 # embedder whether the data deletion succeeded.
35 def main(request, response): 35 def main(request, response):
36 types = [key for key in request.GET.keys()] 36 types = [key for key in request.GET.keys()]
37 header = json.dumps({ "types": types }) 37 header = ",".join("\"" + type + "\"" for type in types)
38 return ([("Clear-Site-Data", header), 38 return ([("Clear-Site-Data", header),
39 ("Content-Type", "text/html")], 39 ("Content-Type", "text/html")],
40 RESPONSE) 40 RESPONSE)
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/external/wpt/clear-site-data/navigation.https.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698