| OLD | NEW |
| (Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <head> |
| 4 <meta http-equiv="Content-Security-Policy" content="style-src 'self' http://
{{domains[www1]}}:{{ports[http][0]}}"> |
| 5 <script src="/resources/testharness.js"></script> |
| 6 <script src="/resources/testharnessreport.js"></script> |
| 7 |
| 8 <script> |
| 9 var t = async_test("Imported style that violates policy should not load"
); |
| 10 document.addEventListener("securitypolicyviolation", t.unreached_func("S
hould not trigger a security policy violation")); |
| 11 </script> |
| 12 |
| 13 <link href="/content-security-policy/style-src/resources/style-src-import.su
b.css" rel=stylesheet type=text/css> |
| 14 </head> |
| 15 <body> |
| 16 <div id='log'></div> |
| 17 |
| 18 <div id="content">Lorem ipsum</div> |
| 19 |
| 20 <script> |
| 21 t.step(function() { |
| 22 var contentEl = document.getElementById("content"); |
| 23 var marginLeftVal = getComputedStyle(contentEl).getPropertyValue('margin
-left'); |
| 24 assert_false(marginLeftVal == "2px") |
| 25 t.done(); |
| 26 }); |
| 27 </script> |
| 28 |
| 29 </body> |
| 30 </html> |
| OLD | NEW |