refresh-same-origin.html (1188B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title>Same-Origin Referrer Policy applied to Refresh</title> 4 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=266554"> 5 <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer"> 6 <link rel="help" href="https://html.spec.whatwg.org/multipage/browsing-the-web.html#populating-a-session-history-entry:concept-request"> 7 <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="./resources/refresh-by-host.js"></script> 11 <body> 12 <script> 13 const path = "resources/referrer-info.sub.html"; 14 const url = new URL(path, location).href; 15 const expectationsByPolicy = { 16 "no-referrer": kExpectEmptyString, 17 "no-referrer-when-downgrade": kExpectFullURL, 18 "origin": kExpectOrigin, 19 "origin-when-cross-origin": kExpectFullURL, 20 "same-origin": kExpectFullURL, 21 "strict-origin": kExpectOrigin, 22 "strict-origin-when-cross-origin": kExpectFullURL, 23 "unsafe-url": kExpectFullURL, 24 "": kExpectFullURL, 25 }; 26 27 refreshWithPoliciesTest(url, expectationsByPolicy); 28 </script>