tor-browser

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

import-style-blocked.sub.html (865B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>import-style-blocked</title>
      5    <meta
      6      http-equiv="Content-Security-Policy"
      7      content="style-src 'unsafe-inline'; script-src 'self' 'unsafe-inline'; connect-src 'self';"
      8    />
      9    <script src="/resources/testharness.js"></script>
     10    <script src="/resources/testharnessreport.js"></script>
     11  </head>
     12  <body>
     13    <script>
     14      promise_test((t) => {
     15        let check_spv = new Promise((resolve, reject) => {
     16          window.addEventListener("securitypolicyviolation", (e) => {
     17            if (e.blockedURI.endsWith("blocked.css")) {
     18              resolve();
     19            }
     20          });
     21        });
     22 
     23        return Promise.all([
     24          promise_rejects_js(t, TypeError, import("./resources/blocked.css", { with: { type: "css" } })),
     25          check_spv,
     26        ]);
     27      });
     28    </script>
     29  </body>
     30 </html>