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

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

Issue 131103003: CSP: Add a mechanism to disable CSP 1.1 for layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
7 if (window.internals)
8 internals.settings.setExperimentalContentSecurityPolicyFeaturesEnabl ed(false);
9 </script>
4 <meta http-equiv="Content-Security-Policy-Report-Only" content="script-src ' self' 'unsafe-inline'"> 10 <meta http-equiv="Content-Security-Policy-Report-Only" content="script-src ' self' 'unsafe-inline'">
5 </head> 11 </head>
6 <body> 12 <body>
7 <script> 13 <script>
8 if (window.testRunner)
9 testRunner.dumpAsText();
10
11 try { 14 try {
12 eval("alert('PASS: eval() executed as expected.');"); 15 eval("alert('PASS: eval() executed as expected.');");
13 } catch(e) { 16 } catch(e) {
14 alert("FAIL: eval() threw an exception."); 17 alert("FAIL: eval() threw an exception.");
15 } 18 }
16 </script> 19 </script>
17 </body> 20 </body>
18 </html> 21 </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