tor-browser

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

generic-0_8_1.sub.html (1373B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4    <title>test wildcard host name matching (asterisk as part of a subdomain is not accepted)</title>
      5    <script>
      6      var t_spv = async_test("Should fire violation events for every failed violation");
      7      var spvEvent;
      8      window.addEventListener("securitypolicyviolation", t_spv.step_func(function(e) {
      9          spvEvent = e;
     10      }));
     11      addEventListener("load", t_spv.step_func_done(function() {
     12          assert_true(!!spvEvent);
     13          assert_equals(spvEvent.violatedDirective, "script-src-elem");
     14      }));
     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    <meta http-equiv="Content-Security-Policy" content="script-src 'self' *w.{{host}}:{{ports[http][0]}} w*.{{host}}:{{ports[http][0]}} 'unsafe-inline';">
     23    <script src='/resources/testharness.js'></script>
     24    <script src='/resources/testharnessreport.js'></script>
     25    <script src='wildcardHostTestFailure.js'></script>
     26 </head>
     27 <body>
     28    <h1>test wildcard host name matching (asterisk as part of a subdomain is not accepted)</h1>
     29    <div id='log'></div>
     30 </body>
     31 </html>