tor-browser

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

generic-0_8.sub.html (1251B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4    <title>test wildcard host name matching (asterisk as a subdomain of the current domain)</title>
      5    <meta http-equiv="Content-Security-Policy" content="script-src 'self' *.{{host}}:{{ports[http][0]}} 'unsafe-inline';">
      6    <script src='/resources/testharness.js'></script>
      7    <script src='/resources/testharnessreport.js'></script>
      8    <script src='wildcardHostTest.js'></script>
      9    <script>
     10      var t = async_test("Test that script does not fire violation event");
     11      window.addEventListener("securitypolicyviolation", t.unreached_func("Should not have fired a violation event"));
     12      window.addEventListener("load", t.step_func(function() {
     13        assert_true(window.wildcardHostTestRan);
     14        t.done();
     15      }));
     16      var head = document.getElementsByTagName('head')[0];
     17      var script = document.createElement('script');
     18      script.type = 'text/javascript';
     19      script.src = "http://www." + location.hostname + ":" + location.port + "/content-security-policy/generic/wildcardHostTestSuceeds.js";
     20      head.appendChild(script);
     21    </script>
     22 </head>
     23 <body>
     24    <h1>test wildcard host name matching (asterisk as a subdomain of the current domain)</h1>
     25    <div id='log'></div>
     26 </body>
     27 </html>