From 89bcbeac72ebf247c9e639358a74f28477283c2b Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Tue, 19 Feb 2019 11:46:28 +0000 Subject: [PATCH] Bug 1526852 [wpt PR 15300] - Remove OriginalTimingAllowOrigin from ResourceTimingInfo, a=testonly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic update from web-platform-tests Remove OriginalTimingAllowOrigin from ResourceTimingInfo The OriginalTimingAllowOrigin attribute was added in https://codereview.chromium.org/271083002 to ensure TAO headers are preserved on cached resources (304 responses). This CL removes it because it seems that it is no longer needed. It also moves the corresponding test to WPT. Bug: 929453 Change-Id: I41e0c84b04a94acc27c22e375f55398d9fc411e5 Reviewed-on: https://chromium-review.googlesource.com/c/1459333 Commit-Queue: Nicolás Peña Moreno Reviewed-by: Yoav Weiss Cr-Commit-Position: refs/heads/master@{#630441} -- wpt-commits: f84a067164651cc9069c36d6098d6a6b03d63816 wpt-pr: 15300 --- .../resource-reload-TAO.sub.html | 25 +++++++++++++++++ .../resource-timing/resources/cors-ahem.py | 17 +++++++++++ .../resources/iframe-reload-TAO.sub.html | 28 +++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 testing/web-platform/tests/resource-timing/resource-reload-TAO.sub.html create mode 100644 testing/web-platform/tests/resource-timing/resources/cors-ahem.py create mode 100644 testing/web-platform/tests/resource-timing/resources/iframe-reload-TAO.sub.html diff --git a/testing/web-platform/tests/resource-timing/resource-reload-TAO.sub.html b/testing/web-platform/tests/resource-timing/resource-reload-TAO.sub.html new file mode 100644 index 000000000000..48ab84bf964e --- /dev/null +++ b/testing/web-platform/tests/resource-timing/resource-reload-TAO.sub.html @@ -0,0 +1,25 @@ + + + + + + + + + + diff --git a/testing/web-platform/tests/resource-timing/resources/cors-ahem.py b/testing/web-platform/tests/resource-timing/resources/cors-ahem.py new file mode 100644 index 000000000000..1998d47c492e --- /dev/null +++ b/testing/web-platform/tests/resource-timing/resources/cors-ahem.py @@ -0,0 +1,17 @@ +import os.path + +def main(request, response): + etag = "123abc" + if etag == request.headers.get("If-None-Match", None): + response.headers.set("X-HTTP-STATUS", 304) + response.status = (304, "Not Modified") + return "" + + response.headers.set("Cache-Control", "public, max-age=86400") + response.headers.set("Content-Type", "font/truetype") + response.headers.set("Access-Control-Allow-Origin", "*") + response.headers.set("Timing-Allow-Origin", "*") + response.headers.set("ETag", etag) + font = "../../fonts/Ahem.ttf" + path = os.path.join(os.path.dirname(__file__), font) + response.content = open(path, "rb").read() diff --git a/testing/web-platform/tests/resource-timing/resources/iframe-reload-TAO.sub.html b/testing/web-platform/tests/resource-timing/resources/iframe-reload-TAO.sub.html new file mode 100644 index 000000000000..577aff7758c7 --- /dev/null +++ b/testing/web-platform/tests/resource-timing/resources/iframe-reload-TAO.sub.html @@ -0,0 +1,28 @@ + +
This fetches ahem font.
+