From aea6e4f23f1cb516d5638f2444baf91be4397b17 Mon Sep 17 00:00:00 2001 From: Hiroki Nakagawa Date: Tue, 19 Oct 2021 19:50:24 -0700 Subject: [PATCH] Prerender: Upstream a test for cookies in same-origin prerendered pages This CL upstreams a test for cookies in same-origin prerendered pages to the WPT. The behavior of cookies is not defined in the spec yet, but we already reached a consensus that the storage APIs including cookies in same-origin prerendered pages are just allowed. See the GitHub issue for details: https://github.com/jeremyroman/alternate-loading-modes/issues/7#issuecomment-944358336 Bug: 1253158 Change-Id: I512a8e6b6f8a20f5464045900d67f8b2ef752266 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3232796 Reviewed-by: Lingqi Chi Commit-Queue: Hiroki Nakagawa Cr-Commit-Position: refs/heads/main@{#933299} --- speculation-rules/prerender/cookies.html | 40 +++++++++++++++++++ .../prerender/resources/cookies-access.html | 15 +++++++ 2 files changed, 55 insertions(+) create mode 100644 speculation-rules/prerender/cookies.html create mode 100644 speculation-rules/prerender/resources/cookies-access.html diff --git a/speculation-rules/prerender/cookies.html b/speculation-rules/prerender/cookies.html new file mode 100644 index 00000000000000..6e83532cce6ef1 --- /dev/null +++ b/speculation-rules/prerender/cookies.html @@ -0,0 +1,40 @@ + +Same-origin prerendering can access cookies + + + + + + + diff --git a/speculation-rules/prerender/resources/cookies-access.html b/speculation-rules/prerender/resources/cookies-access.html new file mode 100644 index 00000000000000..43b636c0a5a31f --- /dev/null +++ b/speculation-rules/prerender/resources/cookies-access.html @@ -0,0 +1,15 @@ + + + +