OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Security-Policy" content="style-src 'self'"> | 4 <meta http-equiv="Content-Security-Policy" content="style-src 'self'"> |
5 <script src="/js-test-resources/js-test-pre.js"></script> | 5 <script src="/js-test-resources/js-test.js"></script> |
6 <style nonce="noncynonce"> | 6 <style nonce="noncynonce"> |
7 #test { | 7 #test { |
8 color: red; | 8 color: red; |
9 } | 9 } |
10 </style> | 10 </style> |
11 </head> | 11 </head> |
12 <body> | 12 <body> |
13 <p id="test">This text should be green.</p> | 13 <p id="test">This text should be green.</p> |
14 <script> | 14 <script> |
15 description("Style that does not match a 'nonce-*' expression in 'st
yle-src' should not be applied to the page."); | 15 description("Style that does not match a 'nonce-*' expression in 'st
yle-src' should not be applied to the page."); |
16 var el = document.querySelector('#test'); | 16 var el = document.querySelector('#test'); |
17 shouldBeEqualToString("window.getComputedStyle(el).color", "rgb(0, 0
, 0)"); | 17 shouldBeEqualToString("window.getComputedStyle(el).color", "rgb(0, 0
, 0)"); |
18 </script> | 18 </script> |
19 </body> | 19 </body> |
20 </html> | 20 </html> |
OLD | NEW |