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

Unified Diff: LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.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
Index: LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.html
diff --git a/LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.html b/LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.html
new file mode 100644
index 0000000000000000000000000000000000000000..68f1f219136eb5ba7caa7996b6b201cc27e0a330
--- /dev/null
+++ b/LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Security-Policy-Report-Only" content="script-src 'self' 'unsafe-inline'; report-uri resources/save-report.php">
+</head>
+<body>
+ <script>
+ try {
+ eval("alert('PASS: eval() allowed!')");
+ } catch (e) {
+ console.log('FAIL: eval() blocked!');
+ }
+ </script>
+ <script src="resources/go-to-echo-report.js"></script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698