tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

multiple-headers.html (1048B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>Referrer Policy: multiple Referrer-Policy headers are allowed</title>
      5    <script src="/resources/testharness.js"></script>
      6    <script src="/resources/testharnessreport.js"></script>
      7 
      8    <script src="/common/security-features/resources/common.sub.js"></script>
      9  </head>
     10  <body>
     11    <h1>Referrer Policy: multiple Referrer-Policy headers are allowed</h1>
     12    <p></p>
     13 
     14    <pre id="received_message">Running...</pre>
     15 
     16    <script>
     17      promise_test(() => {
     18        var urlPath = '/common/security-features/subresource/image.py?cache_destroyer=' + (new Date()).getTime();
     19        var url = location.protocol + "//www1." + location.hostname + ":" + location.port +
     20                  urlPath;
     21        return requestViaImage(url, null, 'no-referrer')
     22          .then(function(message) {
     23              assert_equals(message.referrer, document.location.origin + "/");
     24            });
     25      }, "Image uses the last recognized Referrer-Policy header");
     26    </script>
     27 
     28    <div id="log"></div>
     29  </body>
     30 </html>