tor-browser

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

worker-data-set-timeout.sub.html (988B)


      1 <!DOCTYPE html>
      2 <html>
      3 
      4 <head>
      5    <!-- We add two CSP entries on purpose. The first one does nothing
      6    for the purpose of this test, but we want to check that both are
      7    inherited -->
      8    <meta http-equiv="Content-Security-Policy" content="object-src 'none'">
      9    <meta http-equiv="Content-Security-Policy" content="script-src data: 'self' 'unsafe-inline'; connect-src 'self';">
     10    <title>worker-data-set-timeout</title>
     11    <script src="/resources/testharness.js"></script>
     12    <script src="/resources/testharnessreport.js"></script>
     13    <script src='../support/testharness-helper.js'></script>
     14 </head>
     15 
     16 <body>
     17    <script>
     18      fetch('./support/worker-with-script-src-none-set-timeout.js')
     19       .then(data => data.text())
     20       .then(
     21           text => assert_shared_worker_is_loaded(
     22               `data:text/javascript;base64,${btoa(text)}`,
     23               "Shared worker with data: url inherits CSP",
     24               "setTimeout blocked"));
     25    </script>
     26 </body>
     27 
     28 </html>