From 6cc5850f668b3be05e0621566e43b78e8f16fd25 Mon Sep 17 00:00:00 2001 From: Camille Lamy Date: Fri, 14 Aug 2020 13:53:21 +0000 Subject: [PATCH] COOP: change handling of redirects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL changes the handling of redirects in COOP to match https://github.com/whatwg/html/pull/5739. Instead of comparing a response to the current document, we will compare it to the last entry in the redirect chain. Change-Id: I73a3926a8827733974d7c08b7f3553da06435ac3 Bug: 1108292 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339988 Commit-Queue: Camille Lamy Reviewed-by: Arthur Sonzogni Reviewed-by: Pâris Meuleman Cr-Commit-Position: refs/heads/master@{#798083} GitOrigin-RevId: f338d7dc22470768bb78f1766e8816b15de30884 --- ...opup-redirect-same-origin-allow-popups.https-expected.txt | 5 ----- ...redirect-with-same-origin-allow-popups.https-expected.txt | 5 ----- ...porting-redirect-with-same-origin-allow-popups.https.html | 2 -- 3 files changed, 12 deletions(-) delete mode 100644 blink/web_tests/external/wpt/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https-expected.txt delete mode 100644 blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt diff --git a/blink/web_tests/external/wpt/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https-expected.txt b/blink/web_tests/external/wpt/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https-expected.txt deleted file mode 100644 index 2deb428d5800..000000000000 --- a/blink/web_tests/external/wpt/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https-expected.txt +++ /dev/null @@ -1,5 +0,0 @@ -This is a testharness.js-based test. -FAIL Same origin popup redirects to same-origin with same-origin-allow-popups assert_equals: opener expected "false" but got "true" -FAIL Cross origin popup redirects to same-origin with same-origin-allow-popups assert_equals: opener expected "false" but got "true" -Harness: the test ran to completion. - diff --git a/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt b/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt deleted file mode 100644 index ac2386ee2222..000000000000 --- a/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt +++ /dev/null @@ -1,5 +0,0 @@ -This is a testharness.js-based test. -FAIL Same origin openee redirected to same-origin with same-origin-allow-popups assert_equals: opener expected "false" but got "true" -FAIL Cross origin openee redirected to same-origin with same-origin-allow-popups assert_equals: opener expected "false" but got "true" -Harness: the test ran to completion. - diff --git a/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https.html b/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https.html index f807561f1748..8ede4a73d7ef 100644 --- a/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https.html +++ b/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https.html @@ -103,10 +103,8 @@ "navigation-to-document"); assert_not_equals(report, "timeout", "Report not received"); assert_equals(report.type, "coop"); - assert_equals(report.url, openee_redirect_url.replace(/"/g, '%22')); assert_equals(report.body["disposition"], "enforce"); assert_equals(report.body["effective-policy"], "same-origin-allow-popups"); - assert_equals(report.body["document-uri"], openee_url); }, `${popup_origin.name} openee redirected to same-origin with same-origin-allow-popups`); }