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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode.html
diff --git a/LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode.html b/LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode.html
index 79ae6b449116a53875149c2301f8a8f7cbaa85c6..ec5b8eaf01722a5e3041457dfe65f0b6e95b318a 100644
--- a/LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode.html
+++ b/LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode.html
@@ -1,14 +1,18 @@
<!DOCTYPE html>
<html>
<head>
- <meta http-equiv="Content-Security-Policy-Report-Only" content="script-src 'self'">
+ <meta http-equiv="Content-Security-Policy-Report-Only" content="script-src 'self' 'unsafe-inline'">
</head>
<body>
<script>
if (window.testRunner)
testRunner.dumpAsText();
- eval("alert('PASS: eval() executed as expected.');");
+ try {
+ eval("alert('PASS: eval() executed as expected.');");
+ } catch(e) {
+ alert("FAIL: eval() threw an exception.");
+ }
</script>
</body>
</html>
« 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