Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!doctype html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <meta http-equiv="Content-Security-Policy" content="style-src 'self';"> | |
| 5 <script src="/resources/testharness.js"></script> | |
| 6 <script src="/resources/testharnessreport.js"></script> | |
| 7 | |
| 8 <script> | |
| 9 var t = async_test("@import stylesheet should not load because it does not match style-src"); | |
| 10 var t_spv = async_test("Should fire a securitypolicyviolation event"); | |
| 11 | |
| 12 document.addEventListener("securitypolicyviolation", t_spv.step_func_done( function(e) { | |
| 13 assert_equals("style-src", e.violatedDirective); | |
| 14 })); | |
| 15 </script> | |
| 16 <link href="/content-security-policy/style-src/resources/style-src-import.cs s?pipe=sub" rel=stylesheet type=text/css> | |
|
Mike West
2017/03/29 08:38:01
Ah, I see. You're using `?pipe=sub` instead of ren
andypaicu
2017/03/29 09:55:32
Just a copy/paste. Removed the pipe=sub
| |
| 17 </head> | |
| 18 <body> | |
| 19 <div id='log'></div> | |
| 20 | |
| 21 <div id="content">Lorem ipsum</div> | |
| 22 | |
| 23 <script> | |
| 24 t.step(function() { | |
| 25 var contentEl = document.getElementById("content"); | |
| 26 var marginLeftVal = getComputedStyle(contentEl).getPropertyValue('margin -left'); | |
| 27 assert_false(marginLeftVal == "2px"); | |
| 28 t.done(); | |
| 29 }); | |
| 30 </script> | |
| 31 | |
| 32 </body> | |
| 33 </html> | |
| OLD | NEW |