| Index: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/navigation-preload/resources/resource-timing-scope.py
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/navigation-preload/resources/resource-timing-scope.py b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/navigation-preload/resources/resource-timing-scope.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1820be4400e3eae5b345fe718ed9c2fad69902b0
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/navigation-preload/resources/resource-timing-scope.py
|
| @@ -0,0 +1,19 @@
|
| +import zlib
|
| +
|
| +def main(request, response):
|
| + type = request.GET.first("type")
|
| +
|
| + if type == "normal":
|
| + content = "This is Navigation Preload Resource Timing test."
|
| + output = zlib.compress(content, 9)
|
| + headers = [("Content-type", "text/plain"),
|
| + ("Content-Encoding", "deflate"),
|
| + ("X-Decoded-Body-Size", len(content)),
|
| + ("X-Encoded-Body-Size", len(output)),
|
| + ("Content-Length", len(output))]
|
| + return headers, output
|
| +
|
| + if type == "redirect":
|
| + response.status = 302
|
| + response.headers.append("Location", "redirect-redirected.html")
|
| + return ""
|
|
|