Index: third_party/WebKit/LayoutTests/external/wpt/clear-site-data/support/echo-clear-site-data.py |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/clear-site-data/support/echo-clear-site-data.py b/third_party/WebKit/LayoutTests/external/wpt/clear-site-data/support/echo-clear-site-data.py |
index e8ec8d55327c28339c7466fcf613ff784359f2e1..9cb8beef60cc72220f3b156b0df0373e0340407d 100644 |
--- a/third_party/WebKit/LayoutTests/external/wpt/clear-site-data/support/echo-clear-site-data.py |
+++ b/third_party/WebKit/LayoutTests/external/wpt/clear-site-data/support/echo-clear-site-data.py |
@@ -9,6 +9,8 @@ RESPONSE = """ |
</head> |
<body> |
<script> |
+ TestUtils.setCachedResourceName("%s"); |
+ |
/** |
* A map between a datatype name and whether it is empty. |
* @property Object.<string, boolean> |
@@ -33,8 +35,13 @@ RESPONSE = """ |
# of the datatypes, so that if used in an iframe, it can inform the |
# embedder whether the data deletion succeeded. |
def main(request, response): |
- types = [key for key in request.GET.keys()] |
- header = json.dumps({ "types": types }) |
+ if "cached_resource_name" not in request.GET.keys(): |
+ raise ("Invalid request: Please include the 'cached_resource_name' GET " |
+ "parameter, otherwise cache emptiness can not be verified.") |
+ |
+ types = [key for key in request.GET.keys() |
+ if key != "cached_resource_name"] |
+ header = ",".join("\"" + type + "\"" for type in types) |
return ([("Clear-Site-Data", header), |
("Content-Type", "text/html")], |
- RESPONSE) |
+ RESPONSE % request.GET["cached_resource_name"]) |