Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!doctype html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <meta http-equiv="Content-Security-Policy" content="style-src | |
| 5 'sha1-uCtW0zq0h0gWRvJCsjWCAgrNkNQ=' | |
|
Mike West
2017/03/29 08:38:01
Drop 'sha1-*'. We shouldn't support that. (Do we s
andypaicu
2017/03/29 09:55:32
We most definitely do.
Taken out the sha1 anyway
| |
| 6 'sha256-nxymsvltRxuUc1siDoJx5xeVJN458uBYKe3mBbSqpLk=' | |
| 7 'sha384-q/ooQaWFna3mtP50ztOBzmeyG8Y4ataEWq2BFynU6I5aJ8HqneKEJAfd 70PCzBth' | |
| 8 'sha512-wyqpPU/EH8aoDLYcabrPiA1ELbCmF7eSqaHK7+GsDElGv4L/brV7LsKZ 1cb2u/YWpw0w4An4sbEMnqv8g8Hy8Q=='"> | |
| 9 <script src="/resources/testharness.js"></script> | |
| 10 <script src="/resources/testharnessreport.js"></script> | |
| 11 | |
| 12 <script> | |
| 13 var t = async_test("All style elements should load because they have prope r hashes"); | |
| 14 document.addEventListener("securitypolicyviolation", t.unreached_func("Sho uld not trigger a security policy violation")); | |
| 15 </script> | |
| 16 | |
| 17 <style>#content1 { margin-left: 2px; }</style> | |
| 18 <style>#content2 { margin-left: 2px; }</style> | |
| 19 <style>#content3 { margin-left: 2px; }</style> | |
| 20 <style>#content4 { margin-left: 2px; }</style> | |
| 21 </head> | |
| 22 <body> | |
| 23 <div id='log'></div> | |
| 24 | |
| 25 <div id="content1">Lorem ipsum</div> | |
| 26 <div id="content2">Lorem ipsum</div> | |
| 27 <div id="content3">Lorem ipsum</div> | |
| 28 <div id="content4">Lorem ipsum</div> | |
| 29 | |
| 30 <script> | |
| 31 function make_assert(contentId) { | |
| 32 var contentEl = document.getElementById(contentId); | |
| 33 var marginLeftVal = getComputedStyle(contentEl).getPropertyValue('margin -left'); | |
| 34 assert_true(marginLeftVal == "2px") | |
| 35 } | |
| 36 t.step(function() { | |
| 37 make_assert("content1"); | |
| 38 make_assert("content2"); | |
| 39 make_assert("content3"); | |
| 40 make_assert("content4"); | |
| 41 t.done(); | |
| 42 }); | |
| 43 </script> | |
| 44 | |
| 45 </body> | |
| 46 </html> | |
| OLD | NEW |