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

Side by Side Diff: LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode.html

Issue 19787002: CSP: 'eval()' blocked in report-only mode should send a violation report. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase. Created 7 years, 4 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta http-equiv="Content-Security-Policy-Report-Only" content="script-src ' self'"> 4 <meta http-equiv="Content-Security-Policy-Report-Only" content="script-src ' self' 'unsafe-inline'">
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 if (window.testRunner) 8 if (window.testRunner)
9 testRunner.dumpAsText(); 9 testRunner.dumpAsText();
10 10
11 eval("alert('PASS: eval() executed as expected.');"); 11 try {
12 eval("alert('PASS: eval() executed as expected.');");
13 } catch(e) {
14 alert("FAIL: eval() threw an exception.");
15 }
12 </script> 16 </script>
13 </body> 17 </body>
14 </html> 18 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698