OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <head> |
| 3 <title>SRI on cross origin CORS disabled tyle</title> |
| 4 <style>.id1 { background-color: red }</style> |
| 5 <link rel="stylesheet" |
| 6 crossorigin |
| 7 integrity="ni:///sha256;fy1lC6jbv7rOG6Flb00n5PYLggqe25IcE6QlZf8KtwI=" |
| 8 href="http://localhost:8000/security/resources/cors-style.php?cors=fal
se"></link> |
| 9 </head> |
| 10 <body> |
| 11 <script src="/resources/testharness.js"></script> |
| 12 <script src="/resources/testharnessreport.js"></script> |
| 13 <script> |
| 14 window.onload = function () { |
| 15 var ele = document.getElementById('id1'); |
| 16 var divBackground = window.getComputedStyle(ele, null).getPropertyVa
lue('background-color'); |
| 17 assert_equals(divBackground, "rgb(255, 0, 0)"); |
| 18 done(); |
| 19 }; |
| 20 </script> |
| 21 <div id="id1" class="id1"></div> |
| 22 </body> |
| 23 </html> |
OLD | NEW |