tor-browser

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

generic-0_2.html (929B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4    <title>'self' keyword positive test</title>
      5    <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'nonce-abc';">
      6    <script src='/resources/testharness.js'></script>
      7    <script src='/resources/testharnessreport.js'></script>
      8    <script nonce='abc'>
      9      var t_spv = async_test("Should fire violation events for every failed violation");
     10      window.addEventListener(
     11        "securitypolicyviolation", t_spv.unreached_func("securitypolicyviolation should not be emitted"));
     12 
     13      window.addEventListener("load", function() {
     14        t_spv.done();
     15      });
     16    </script>
     17    <script src='positiveTest.js'></script>
     18    <script nonce='abc'>
     19      test(function() {
     20        assert_true(window.cspPositiveTest);
     21      }, "Allows scripts from the same host.");
     22    </script>
     23 </head>
     24 <body>
     25    <h1>'self' keyword positive test</h1>
     26    <div id='log'></div>
     27 </body>
     28 </html>