|
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|
2 <html> |
|
3 <head> |
|
4 <title>CSP inline script tests</title> |
|
5 <!-- content= "div#linkstylediv { color: #0f0; }" --> |
|
6 <link rel="stylesheet" type="text/css" |
|
7 href='file_CSP.sjs?type=text/css&content=div%23linkstylediv%20%7B%20color%3A%20%230f0%3B%20%7D' /> |
|
8 </head> |
|
9 <body> |
|
10 |
|
11 <style type="text/css"> |
|
12 div#inlinestylediv { |
|
13 color: #00ff00; |
|
14 } |
|
15 </style> |
|
16 |
|
17 <div id='linkstylediv'>Link tag (external) stylesheet test (should be green)</div> |
|
18 <div id='attrstylediv' style="color: #00ff00;">Attribute stylesheet test (should be green)</div> |
|
19 <div id='inlinestylediv'>Inline stylesheet test (should be green)</div> |
|
20 |
|
21 <!-- tests for SMIL stuff - animations --> |
|
22 <svg xmlns="http://www.w3.org/2000/svg" |
|
23 xmlns:xlink="http://www.w3.org/1999/xlink" |
|
24 width="100%" |
|
25 height="100px"> |
|
26 |
|
27 <!-- Animates XML attribute, which is mapped into style. --> |
|
28 <text id="xmlTest" x="0" y="15"> |
|
29 This should be green since the animation should be allowed by CSP. |
|
30 |
|
31 <animate attributeName="fill" attributeType="XML" |
|
32 values="lime;green;lime" dur="2s" |
|
33 repeatCount="indefinite" /> |
|
34 </text> |
|
35 |
|
36 <!-- Animates override value for CSS property. --> |
|
37 <text id="cssOverrideTest" x="0" y="35"> |
|
38 This should be green since the animation should be allowed by CSP. |
|
39 |
|
40 <animate attributeName="fill" attributeType="CSS" |
|
41 values="lime;green;lime" dur="2s" |
|
42 repeatCount="indefinite" /> |
|
43 </text> |
|
44 |
|
45 <!-- Animates override value for CSS property targeted via ID. --> |
|
46 <text id="cssOverrideTestById" x="0" y="55"> |
|
47 This should be green since the animation should be allowed by CSP. |
|
48 </text> |
|
49 <animate xlink:href="#cssOverrideTestById" |
|
50 attributeName="fill" |
|
51 values="lime;green;lime" |
|
52 dur="2s" repeatCount="indefinite" /> |
|
53 |
|
54 <!-- Sets value for CSS property targeted via ID. --> |
|
55 <text id="cssSetTestById" x="0" y="75"> |
|
56 This should be green since the <set> should be allowed by CSP. |
|
57 </text> |
|
58 <set xlink:href="#cssSetTestById" |
|
59 attributeName="fill" |
|
60 to="lime" /> |
|
61 </svg> |
|
62 </body> |
|
63 </html> |