Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: LayoutTests/http/tests/security/contentSecurityPolicy/1.1/stylehash-default-src.html

Issue 1360693002: Apply CSP default-src hash values to script-src and style src. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Security-Policy" content="default-src 'sha256- SXMrww9+PS7ymkxYbv91id+HfXeO7p1uCY0xhNb4MIw='; script-src 'unsafe-inline'">
5 </head>
6 <body>
7 <p id="p">This tests the result of a valid style hash. It passes if this text is green, and a "PASS" alert for p is fired.</p>
8 <style>p#p { color: green; }</style>
9 <script>
10 if (window.testRunner)
11 testRunner.dumpAsText();
12
13 var color = window.getComputedStyle(document.querySelector('#p')).co lor;
14 if (color === "rgb(0, 128, 0)")
15 alert("PASS: The '#p' element's text is green, which means the s tyle was correctly applied.");
16 else
17 alert("FAIL: The '#p' element's text is " + color + ", which mea ns the style was incorrectly applied.");
Mike West 2015/09/22 04:37:38 Nit: I know you've probably copy/pasted this from
jww 2015/09/22 16:55:37 Changed test, will add to w3c/web-platform-tests s
18 </script>
19 </body>
20 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698