tor-browser

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

test_base_header_csp_img.html (762B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <title>Base with base-uri CSP header</title>
      5  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
      7 
      8  <!-- Base should be ignored -->
      9  <base href="http://example.org/">
     10 </head>
     11 <body>
     12 
     13 <img src="/tests/parser/htmlparser/tests/mochitest/file_base_csp_img.sjs?image" width=10 height=10>
     14 
     15 <script>
     16 add_task(async function() {
     17  let response = await fetch(
     18    "http://mochi.test:8888/tests/parser/htmlparser/tests/mochitest/file_base_csp_img.sjs?result"
     19  );
     20  let hosts = await response.json();
     21 
     22  is(hosts.length, 1, "One host");
     23  is(hosts[0], "mochi.test", "Host was not influenced by base");
     24 
     25  info("finished");
     26 });
     27 </script>
     28 
     29 </body>
     30 </html>