From 58f536d48acaf57576f067af25a8708696232745 Mon Sep 17 00:00:00 2001 From: Hiroki Nakagawa Date: Sun, 17 Oct 2021 21:47:00 -0700 Subject: [PATCH] Prerender: Upstream tests for storage APIs in same-origin prerendered pages (2) This CL upstreams tests for storage APIs (Storage Foundation, Web Database) in same-origin prerendered pages to the WPT. The behavior of these APIs is not defined in the spec yet, but we already reached a consensus that the storage APIs 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: If34e4f325341a95f036beff43af19dde3504a8ac Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3226531 Reviewed-by: Kouhei Ueno Reviewed-by: Lingqi Chi Commit-Queue: Hiroki Nakagawa Cr-Commit-Position: refs/heads/main@{#932416} --- .../storage-foundation-access.https.html | 42 +++++++++++ .../resources/web-database-access.html | 21 ++++++ .../prerender/storage-foundation.https.html | 67 ++++++++++++++++++ speculation-rules/prerender/web-database.html | 70 +++++++++++++++++++ 4 files changed, 200 insertions(+) create mode 100644 speculation-rules/prerender/resources/storage-foundation-access.https.html create mode 100644 speculation-rules/prerender/resources/web-database-access.html create mode 100644 speculation-rules/prerender/storage-foundation.https.html create mode 100644 speculation-rules/prerender/web-database.html diff --git a/speculation-rules/prerender/resources/storage-foundation-access.https.html b/speculation-rules/prerender/resources/storage-foundation-access.https.html new file mode 100644 index 00000000000000..4ab8b062c93f84 --- /dev/null +++ b/speculation-rules/prerender/resources/storage-foundation-access.https.html @@ -0,0 +1,42 @@ + + + + diff --git a/speculation-rules/prerender/resources/web-database-access.html b/speculation-rules/prerender/resources/web-database-access.html new file mode 100644 index 00000000000000..99741906ed3b70 --- /dev/null +++ b/speculation-rules/prerender/resources/web-database-access.html @@ -0,0 +1,21 @@ + + + + diff --git a/speculation-rules/prerender/storage-foundation.https.html b/speculation-rules/prerender/storage-foundation.https.html new file mode 100644 index 00000000000000..ca1b9363f4b243 --- /dev/null +++ b/speculation-rules/prerender/storage-foundation.https.html @@ -0,0 +1,67 @@ + +Same-origin prerendering can access Storage Foundation API + + + + + + + diff --git a/speculation-rules/prerender/web-database.html b/speculation-rules/prerender/web-database.html new file mode 100644 index 00000000000000..3e59c3c2959777 --- /dev/null +++ b/speculation-rules/prerender/web-database.html @@ -0,0 +1,70 @@ + +Same-origin prerendering can access Web Database + + + + + + +