tor-browser

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

report-strips-fragment.html (738B)


      1 <!DOCTYPE html>
      2 <head>
      3  <script src="/resources/testharness.js"></script>
      4  <script src="/resources/testharnessreport.js"></script>
      5  <script src="/content-security-policy/support/testharness-helper.js"></script>
      6  <meta http-equiv="Content-Security-Policy" content="img-src 'none'">
      7 </head>
      8 <body>
      9  <script>
     10  async_test(t => {
     11    waitUntilCSPEventForURL(t, "https://evil.com/img.png")
     12      .then(t.step_func_done(e => {
     13        var u = new URL(e.documentURI);
     14        assert_equals(u.hash, "");
     15      }));
     16 
     17    window.location.hash = "should-not-appear-in-report";
     18 
     19    var i = document.createElement("img");
     20    i.src = "https://evil.com/img.png#boo";
     21  }, "Reported document URI does not contain fragments.");
     22  </script>
     23 </body>