tor-browser

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

frame-ancestors-none-block.html (742B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4    <script src="/resources/testharness.js"></script>
      5    <script src="/resources/testharnessreport.js"></script>
      6    <script src="support/frame-ancestors-test.sub.js"></script>
      7 </head>
      8 <body>
      9  <script>
     10    async_test(t => {
     11      window.addEventListener('securitypolicyviolation', t.step_func(function(e) {
     12        if (e.violatedDirective === 'frame-ancestors')
     13          assert_unreached('No securitypolicyviolation event shoud be raised in the parent.');
     14      }));
     15      t.step_timeout(function() { t.done(); }, 2000);
     16    });
     17 
     18    test = async_test("A 'frame-ancestors' CSP directive with a value 'none' should block rendering.");
     19 
     20    sameOriginFrameShouldBeBlocked("'none'");
     21  </script>
     22 </body>
     23 </html>