tor-browser

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

internal-stylesheet.html (1349B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>CSS integration - styling SVG from internal style</title>
      5    <script src="/resources/testharness.js"></script>
      6    <script src="/resources/testharnessreport.js"></script>
      7    <script src="/common/utils.js"></script>
      8    <!-- Common global functions for referrer-policy tests. -->
      9    <script src="/common/security-features/resources/common.sub.js"></script>
     10    <!-- Helper functions for referrer-policy css tests. -->
     11    <script src="/referrer-policy/css-integration/css-test-helper.js"></script>
     12    <meta name="referrer" content="origin">
     13  </head>
     14  <body>
     15    <p>Check that resources from internal styles are loaded with
     16    the referrer and referrer policy from the document.</p>
     17    <script>
     18      function setInternalStyle(test) {
     19        test.expected = location.origin + "/";
     20        let style = document.createElementNS(svg_ns, "style");
     21        style.textContent = "path { " + test.property + ": url(" + url_prefix +
     22                            "svg.py?id=" + test.id + "#invalidFragment);";
     23        let svg = createSvg();
     24        svg.appendChild(style);
     25        document.body.appendChild(svg);
     26      }
     27 
     28      runSvgTests(svg_test_properties,
     29                  "Styling SVG from internal styles",
     30                  setInternalStyle);
     31    </script>
     32 
     33    <div id="log"></div>
     34  </body>
     35 </html>