From 4119753a71223397b7db5100c84086848761c407 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Mon, 12 Feb 2024 10:11:59 +1300 Subject: [PATCH] Doctype but fix and extra styling --- referrer-policy-test.rkt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/referrer-policy-test.rkt b/referrer-policy-test.rkt index 0ac3b65..967e09a 100644 --- a/referrer-policy-test.rkt +++ b/referrer-policy-test.rkt @@ -65,7 +65,7 @@ (response/xexpr #:headers (list (header #"Referrer-Policy" #"no-referrer") (header #"Cache-Control" #"no-cache")) - #:preamble #"" + #:preamble #"" `(html (head (title "Referrer-Policy Header Test") ,@(for/list ([path (set->list css-paths)]) @@ -76,8 +76,11 @@ (code "Referrer-Policy: no-referrer")) (h2 "#1: Image from element in document") (div ((class "test-case")) (img ((src "/img/element")))) - (h2 "#2: Image from style attribute") - (div ((class "test-case") (style "background-image: url(/img/inline-style)"))) + (div + ((class "bug")) + (h2 "⚠ #2: Image from style attribute ⚠") + (p "In Chromium, this one sends a Referer. I consider this a bug. Ideally, it shouldn't send a Referer header because of the main document's Referrer-Policy.") + (div ((class "test-case") (style "background-image: url(/img/inline-style)")))) (h2 "#3: Image from same-origin stylesheet, no extra headers") (div ((class "test-case same-origin-no-extra-img"))) (h2 "#4: Image from same-origin stylesheet with " (code "Referrer-Policy: no-referrer")) @@ -86,8 +89,9 @@ (div ((class "test-case same-origin-policy-origin-img")))))))) (make-css-route "/style/default.css" null " body { font: 16px sans-serif; } -.test-case { width: 100%; height: 60px; background: antiquewhite; background-repeat: no-repeat; } +.test-case { width: 100%; height: 60px; background-color: antiquewhite; background-position: left; background-repeat: no-repeat; display: grid; align-content: center; } .same-origin-no-extra-img { background-image: url(/img/same-origin-no-extra); } +.bug { color: maroon; } ") (make-css-route "/style/policy-no-referrer.css" (list (header #"Referrer-Policy" #"no-referrer")) " .same-origin-policy-no-referrer-img { background-image: url(/img/same-origin-policy-no-referrer); } -- 2.45.2