content/base/test/csp/file_CSP_inlinestyle_main.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/test/csp/file_CSP_inlinestyle_main.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,63 @@
     1.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
     1.5 +<html>
     1.6 +  <head>
     1.7 +    <title>CSP inline script tests</title>
     1.8 +    <!-- content= "div#linkstylediv { color: #0f0; }" -->
     1.9 +    <link rel="stylesheet" type="text/css"
    1.10 +          href='file_CSP.sjs?type=text/css&content=div%23linkstylediv%20%7B%20color%3A%20%230f0%3B%20%7D' />
    1.11 +  </head>
    1.12 +  <body>
    1.13 +
    1.14 +    <style type="text/css">
    1.15 +      div#inlinestylediv {
    1.16 +        color: #00ff00;
    1.17 +      }
    1.18 +    </style>
    1.19 +
    1.20 +    <div id='linkstylediv'>Link tag (external) stylesheet test (should be green)</div>
    1.21 +    <div id='attrstylediv' style="color: #00ff00;">Attribute stylesheet test (should be green)</div>
    1.22 +    <div id='inlinestylediv'>Inline stylesheet test (should be green)</div>
    1.23 +
    1.24 +	    <!-- tests for SMIL stuff - animations -->
    1.25 +    <svg xmlns="http://www.w3.org/2000/svg"
    1.26 +         xmlns:xlink="http://www.w3.org/1999/xlink"
    1.27 +         width="100%"
    1.28 +         height="100px">
    1.29 +
    1.30 +      <!-- Animates XML attribute, which is mapped into style. -->
    1.31 +      <text id="xmlTest" x="0" y="15">
    1.32 +         This should be green since the animation should be allowed by CSP.
    1.33 +
    1.34 +        <animate attributeName="fill" attributeType="XML"
    1.35 +                  values="lime;green;lime" dur="2s"
    1.36 +                  repeatCount="indefinite" />
    1.37 +      </text>
    1.38 +
    1.39 +      <!-- Animates override value for CSS property. -->
    1.40 +      <text id="cssOverrideTest" x="0" y="35">
    1.41 +         This should be green since the animation should be allowed by CSP.
    1.42 +
    1.43 +        <animate attributeName="fill" attributeType="CSS"
    1.44 +                  values="lime;green;lime" dur="2s"
    1.45 +                  repeatCount="indefinite" />
    1.46 +      </text>
    1.47 +
    1.48 +      <!-- Animates override value for CSS property targeted via ID. -->
    1.49 +      <text id="cssOverrideTestById" x="0" y="55">
    1.50 +         This should be green since the animation should be allowed by CSP.
    1.51 +      </text>
    1.52 +      <animate xlink:href="#cssOverrideTestById"
    1.53 +               attributeName="fill"
    1.54 +               values="lime;green;lime"
    1.55 +               dur="2s" repeatCount="indefinite" />
    1.56 +
    1.57 +      <!-- Sets value for CSS property targeted via ID. -->
    1.58 +      <text id="cssSetTestById" x="0" y="75">
    1.59 +         This should be green since the &lt;set&gt; should be allowed by CSP.
    1.60 +      </text>
    1.61 +      <set xlink:href="#cssSetTestById"
    1.62 +               attributeName="fill"
    1.63 +               to="lime" />
    1.64 +    </svg>
    1.65 +  </body>
    1.66 +</html>

mercurial