From cc0e93e2935ac64555b6cf9c5db2eab04a5ad1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A2ris=20MEULEMAN?= Date: Mon, 3 Aug 2020 06:45:51 -0700 Subject: [PATCH] COOP: add redirect WPT tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL adds a WPT test that checks the interaction of COOP same-origin-allow-popups with redirects as specified in https://github.com/whatwg/html/pull/5739. This follows up on Clamy@ work in https://crrev.com/2312796. Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260 Reviewed-by: Arthur Sonzogni Commit-Queue: Pâris Meuleman Auto-Submit: Pâris Meuleman Cr-Commit-Position: refs/heads/master@{#794090} --- ...t-with-same-origin-allow-popups.https.html | 84 +++++++++++++++++++ .../reporting/resources/dispatcher.js | 2 + 2 files changed, 86 insertions(+) create mode 100644 html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https.html diff --git a/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https.html b/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https.html new file mode 100644 index 00000000000000..7dba76c4ef5434 --- /dev/null +++ b/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https.html @@ -0,0 +1,84 @@ + + COOP reports are to the opener when the opener used COOP-RO+COEP and then its + cross-origin openee tries to access it. + + + + + + + + + diff --git a/html/cross-origin-opener-policy/reporting/resources/dispatcher.js b/html/cross-origin-opener-policy/reporting/resources/dispatcher.js index 38243fab81a8c0..13c01add30fcc1 100644 --- a/html/cross-origin-opener-policy/reporting/resources/dispatcher.js +++ b/html/cross-origin-opener-policy/reporting/resources/dispatcher.js @@ -64,6 +64,8 @@ const reportToHeaders = function(uuid) { return { header: `|header(report-to,${reportToJSON})`, coopSameOriginHeader: `|header(Cross-Origin-Opener-Policy,same-origin%3Breport-to="${uuid}")`, + coopSameOriginAllowPopupsHeader: `|header(Cross-Origin-Opener-Policy,same-origin-allow-popups%3Breport-to="${uuid}")`, coopReportOnlySameOriginHeader: `|header(Cross-Origin-Opener-Policy-Report-Only,same-origin%3Breport-to="${uuid}")`, + coopReportOnlySameOriginAllowPopupsHeader: `|header(Cross-Origin-Opener-Policy-Report-Only,same-origin-allow-popups%3Breport-to="${uuid}")`, }; };