From cb06cee910e1807ceec5ed392888952b21fc30c9 Mon Sep 17 00:00:00 2001
From: Kunihiko Sakamoto
Date: Thu, 25 May 2023 17:43:55 -0700
Subject: [PATCH] Remove uuid-in-package navigation with Web Bundles
This removes the support for the opaque origin iframes with WebBundles
using uuid-in-package: URL resources
(https://github.com/WICG/webpackage/blob/main/explainers/subresource-loading-opaque-origin-iframes.md).
Intent to Deprecate and Remove:
https://groups.google.com/a/chromium.org/g/blink-dev/c/iyhes6tMz2Y
Bug: 1447452
Change-Id: I484594209b216cfe2427a8ca9a3f87cc134af161
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4428820
Reviewed-by: Hayato Ito
Commit-Queue: Kunihiko Sakamoto
Reviewed-by: Reilly Grant
Reviewed-by: Dominick Ng
Reviewed-by: Rakina Zata Amni
Cr-Commit-Position: refs/heads/main@{#1149461}
---
.../coep.https.tentative.html | 45 +-----
.../corp.https.tentative.html | 22 +--
.../csp-allowed.https.tentative.html | 33 +----
.../csp-blocked.https.tentative.html | 45 +-----
.../resource-timing.https.tentative.html | 12 +-
...ice-worker-controlled.https.tentative.html | 31 +---
...frame-from-web-bundle.https.tentative.html | 134 ------------------
7 files changed, 14 insertions(+), 308 deletions(-)
delete mode 100644 web-bundle/subresource-loading/subframe-from-web-bundle.https.tentative.html
diff --git a/web-bundle/subresource-loading/coep.https.tentative.html b/web-bundle/subresource-loading/coep.https.tentative.html
index 4029fc6f815eb9..5e48cb73524aac 100644
--- a/web-bundle/subresource-loading/coep.https.tentative.html
+++ b/web-bundle/subresource-loading/coep.https.tentative.html
@@ -32,10 +32,7 @@
"resources": [
"https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/no-corp.js",
"https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/corp-same-origin.js",
- "https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/corp-cross-origin.js",
- "uuid-in-package:5eafff38-e0a0-4661-bde0-434255aa9d93",
- "uuid-in-package:7e13b47a-8b91-4a0e-997c-993a5e2f3a34",
- "uuid-in-package:86d5b696-8867-4454-8b07-51239a0817f7"
+ "https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/corp-cross-origin.js"
]
}
@@ -64,11 +61,6 @@
const prefix =
"https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/";
- const no_corp_url = "uuid-in-package:5eafff38-e0a0-4661-bde0-434255aa9d93";
- const corp_same_origin_url =
- "uuid-in-package:7e13b47a-8b91-4a0e-997c-993a5e2f3a34";
- const corp_cross_origin_url =
- "uuid-in-package:86d5b696-8867-4454-8b07-51239a0817f7";
promise_test(async () => {
const report = await expectCOEPReport(async () => {
@@ -88,40 +80,5 @@
await addScriptAndWaitForExecution(prefix + "corp-cross-origin.js");
}, "Cross-origin subresource with Cross-Origin-Resource-Policy: cross-origin should be loaded.");
- promise_test(async () => {
- const report = await expectCOEPReport(async () => {
- const iframe = document.createElement("iframe");
- iframe.src = no_corp_url;
- document.body.appendChild(iframe);
- });
-
- assert_equals(report.body.blockedURL, no_corp_url);
- assert_equals(report.body.type, "corp");
- assert_equals(report.body.disposition, "enforce");
- assert_equals(report.body.destination, "iframe");
- }, "uuid-in-package iframe without Cross-Origin-Resource-Policy: header should be blocked and generate a report.");
-
- promise_test(async () => {
- const report = await expectCOEPReport(async () => {
- const iframe = document.createElement("iframe");
- iframe.src = corp_same_origin_url;
- document.body.appendChild(iframe);
- });
-
- assert_equals(report.body.blockedURL, corp_same_origin_url);
- assert_equals(report.body.type, "corp");
- assert_equals(report.body.disposition, "enforce");
- assert_equals(report.body.destination, "iframe");
- }, "uuid-in-package iframe with Cross-Origin-Resource-Policy: same-origin should be blocked and generate a report.");
-
- promise_test(async () => {
- const iframe = document.createElement("iframe");
- iframe.src = corp_cross_origin_url;
- await addElementAndWaitForLoad(iframe);
- assert_equals(
- await evalInIframe(iframe, "location.href"),
- corp_cross_origin_url
- );
- }, "uuid-in-package iframe with Cross-Origin-Resource-Policy: cross-origin should not be blocked.");
-
-