OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Style element has error on bad style nonce</title> |
| 5 <meta http-equiv="Content-Security-Policy" content="style-src 'nonce-nonceyn
once'"> |
| 6 <script src="/resources/testharness.js"></script> |
| 7 <script src="/resources/testharnessreport.js"></script> |
| 8 <script> |
| 9 function styleError() { |
| 10 var color = window.getComputedStyle(document.querySelector('p')).col
or; |
| 11 assert_equals(color, "rgb(0, 128, 0)", "The color of the paragraph i
s still green."); |
| 12 done(); |
| 13 } |
| 14 </script> |
| 15 <style nonce="nonceynonce">p { color: green; }</style> |
| 16 <style nonce="notavalidnonce" onerror="styleError();">p { color: red; }</sty
le> |
| 17 </head> |
| 18 <p>A test paragraph</p> |
| 19 </html> |
OLD | NEW |