tor-browser

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

embedder-csp-not-propagate.https.html (845B)


      1 <!DOCTYPE html>
      2 <title>Test embedder CSP not propagate to fenced frame</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="/common/utils.js"></script>
      6 <script src="/common/dispatcher/dispatcher.js"></script>
      7 <script src="resources/utils.js"></script>
      8 
      9 <body>
     10 <script>
     11 promise_test(async(t) => {
     12 const iframe = attachIFrameContext(
     13     {headers:[["Content-Security-Policy", "frame-src 'self'"]]});
     14  await iframe.execute(async() => {
     15    const fencedframe = attachFencedFrameContext();
     16    await fencedframe.execute(async() => {
     17      const nested_iframe = attachIFrameContext(
     18          {origin:get_host_info().HTTPS_REMOTE_ORIGIN});
     19      await nested_iframe.execute(() => {});
     20    });
     21  });
     22 }, 'Embedder CSP should not propagate to fenced frame');
     23 </script>
     24 </body>