tor-browser

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

svg-use-blocked.tentative.html (729B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4    <meta http-equiv="Content-Security-Policy" content="img-src 'none'">
      5    <title>SVG use blocked as img</title>
      6    <script src="/resources/testharness.js"></script>
      7    <script src="/resources/testharnessreport.js"></script>
      8    <script>
      9      async_test(t => {
     10        window.addEventListener('securitypolicyviolation',
     11                                t.step_func_done(e => {
     12          assert_equals(e.effectiveDirective, "img-src");
     13          assert_true(e.blockedURI.endsWith("use.svg"));
     14        }));
     15      }, "Blocked SVG <use> element");
     16    </script>
     17    <link rel="stylesheet" href="resources/blue.css">
     18 </head>
     19 <body>
     20  <svg>
     21    <use href="use.svg#bar"></use>
     22  </svg>
     23 </body>
     24 </html>