From 3276e8d153ba3bc5d7676fcf3abf37b824f9158e Mon Sep 17 00:00:00 2001 From: Mustafa Emre Acer Date: Thu, 14 Dec 2023 15:11:13 -0800 Subject: [PATCH] Add WPT for referrer handling in HTTPS Upgrades This WPT test checks that HTTPS Upgrading does not drop referrer information when: 1. Referrer policy is no-referrer-when-downgrade 2. A navigation is made to an URL is HTTP 3. Navigated URL is successfully upgraded to HTTPS In this scenario, the upgraded HTTPS URL should get the referrer information since the connection was never downgraded to an unsafe URL. The current implementation of HTTPS Upgrades in Chrome doesn't pass this test, dropping the referrer. Bug: 1394910 Change-Id: I459e5fcdc97adc19dc42aa5ba1ca0b1617d2158d --- .../resources/pass-with-referrer.html | 13 +++++++++ .../tentative/referrer.https.sub.html | 29 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 https-upgrades/resources/pass-with-referrer.html create mode 100644 https-upgrades/tentative/referrer.https.sub.html diff --git a/https-upgrades/resources/pass-with-referrer.html b/https-upgrades/resources/pass-with-referrer.html new file mode 100644 index 00000000000000..be978c16dc866f --- /dev/null +++ b/https-upgrades/resources/pass-with-referrer.html @@ -0,0 +1,13 @@ + + + + + + diff --git a/https-upgrades/tentative/referrer.https.sub.html b/https-upgrades/tentative/referrer.https.sub.html new file mode 100644 index 00000000000000..3cd83ba561c2b5 --- /dev/null +++ b/https-upgrades/tentative/referrer.https.sub.html @@ -0,0 +1,29 @@ + + + + HTTPS Upgrades: Upgrade. + + + + + + + + + + +