tor-browser

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

expect-no-client-hints-headers.html (620B)


      1 <!DOCTYPE html>
      2 <html>
      3 <body>
      4 <script>
      5 
      6 // This test checks if browser attaches the viewport-width client hint in the
      7 // HTTP request headers.
      8 
      9 // resources/echo-client-hints-received.py sets the response headers depending on the set
     10 // of client hints it receives in the request headers.
     11 
     12 fetch("../resources/echo-client-hints-received.py").then(r => {
     13  if(r.status == 200 &&
     14     !r.headers.has("viewport-width-received") &&
     15     !r.headers.has("viewport-width-received")) {
     16    window.top.opener.postMessage('PASS', '*');
     17  } else {
     18    window.top.opener.postMessage('FAIL', '*');
     19  }
     20 });
     21 
     22 </script>
     23 </body>
     24 </html>