CSP: 'violated-directive' should match 'effective-directive'.

In [1], mikispag@ noted that we're currently returning the entire
text of the violated directive, including its source list, etc. This
information is replicated in the report via the 'original-policy'
property, and CSP3 defines both 'violated-directive' and
'effective-directive' to contain the same data.

This patch changes our implementation in line with the spec.

[1]: https://github.com/w3c/web-platform-tests/pull/4020

R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2447003002
Cr-Commit-Position: refs/heads/master@{#427634}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/base-uri-deny-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/base-uri-deny-expected.txt
index e20af37..782ce0a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/base-uri-deny-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/base-uri-deny-expected.txt
@@ -10,7 +10,7 @@
 PASS window.e.documentURI is "http://127.0.0.1:8000/security/contentSecurityPolicy/1.1/base-uri-deny.html"
 PASS window.e.referrer is ""
 PASS window.e.blockedURI is "http://example.com/base"
-PASS window.e.violatedDirective is "base-uri 'self'"
+PASS window.e.violatedDirective is "base-uri"
 PASS window.e.effectiveDirective is "base-uri"
 PASS window.e.originalPolicy is "base-uri 'self'"
 PASS window.e.sourceFile is "http://127.0.0.1:8000/security/contentSecurityPolicy/1.1/base-uri-deny.html"
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/base-uri-deny.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/base-uri-deny.html
index 43dc620..ef2ac6f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/base-uri-deny.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/base-uri-deny.html
@@ -11,7 +11,7 @@
             'documentURI': document.location.toString(),
             'referrer': document.referrer,
             'blockedURI': 'http://example.com/base',
-            'violatedDirective': 'base-uri \'self\'',
+            'violatedDirective': 'base-uri',
             'effectiveDirective': 'base-uri',
             'originalPolicy': 'base-uri \'self\'',
             'sourceFile': document.location.toString(),
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt
index 8fb209d..1cb8b03 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt
@@ -5,4 +5,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/1.1/report-uri-effective-directive.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/1.1/report-uri-effective-directive.php","referrer":"","violated-directive":"default-src 'self'","effective-directive":"script-src","original-policy":"default-src 'self'; report-uri ../resources/save-report.php?test=report-uri-effective-directive.php","disposition":"enforce","blocked-uri":"inline","line-number":6,"status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/1.1/report-uri-effective-directive.php","referrer":"","violated-directive":"script-src","effective-directive":"script-src","original-policy":"default-src 'self'; report-uri ../resources/save-report.php?test=report-uri-effective-directive.php","disposition":"enforce","blocked-uri":"inline","line-number":6,"status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report-expected.txt
index 9df46948..607ad9dd 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report-expected.txt
@@ -6,4 +6,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.php","referrer":"","violated-directive":"script-src 'self' 'unsafe-inline'","effective-directive":"script-src","original-policy":"script-src 'self' 'unsafe-inline'; report-uri resources/save-report.php?test=eval-allowed-in-report-only-mode-and-sends-report.php","disposition":"report","blocked-uri":"eval","line-number":12,"column-number":13,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.php","status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.php","referrer":"","violated-directive":"script-src","effective-directive":"script-src","original-policy":"script-src 'self' 'unsafe-inline'; report-uri resources/save-report.php?test=eval-allowed-in-report-only-mode-and-sends-report.php","disposition":"report","blocked-uri":"eval","line-number":12,"column-number":13,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.php","status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/eval-blocked-and-sends-report-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/eval-blocked-and-sends-report-expected.txt
index ab934c9..35eb954 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/eval-blocked-and-sends-report-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/eval-blocked-and-sends-report-expected.txt
@@ -6,4 +6,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/eval-blocked-and-sends-report.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/eval-blocked-and-sends-report.php","referrer":"","violated-directive":"script-src 'self' 'unsafe-inline'","effective-directive":"script-src","original-policy":"script-src 'self' 'unsafe-inline'; report-uri resources/save-report.php?test=eval-blocked-and-sends-report.php","disposition":"enforce","blocked-uri":"eval","line-number":8,"column-number":13,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/eval-blocked-and-sends-report.php","status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/eval-blocked-and-sends-report.php","referrer":"","violated-directive":"script-src","effective-directive":"script-src","original-policy":"script-src 'self' 'unsafe-inline'; report-uri resources/save-report.php?test=eval-blocked-and-sends-report.php","disposition":"enforce","blocked-uri":"eval","line-number":8,"column-number":13,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/eval-blocked-and-sends-report.php","status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt
index 8e5f527..8b809c9 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt
@@ -9,4 +9,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-and-enforce.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-and-enforce.php","referrer":"","violated-directive":"script-src 'self'","effective-directive":"script-src","original-policy":"script-src 'self'; report-uri resources/save-report.php?test=report-and-enforce.php","disposition":"report","blocked-uri":"inline","line-number":9,"status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-and-enforce.php","referrer":"","violated-directive":"script-src","effective-directive":"script-src","original-policy":"script-src 'self'; report-uri resources/save-report.php?test=report-and-enforce.php","disposition":"report","blocked-uri":"inline","line-number":9,"status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt
index 6c29ee9..063acdb 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt
@@ -6,4 +6,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-data-uri.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-data-uri.php","referrer":"","violated-directive":"img-src 'none'","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri resources/save-report.php?test=report-blocked-data-uri.php","disposition":"enforce","blocked-uri":"data","line-number":7,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-data-uri.php","status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-data-uri.php","referrer":"","violated-directive":"img-src","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri resources/save-report.php?test=report-blocked-data-uri.php","disposition":"enforce","blocked-uri":"data","line-number":7,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-data-uri.php","status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt
index 9fc4544..156315de 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt
@@ -6,4 +6,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-file-uri.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-file-uri.php","referrer":"","violated-directive":"img-src 'none'","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri resources/save-report.php?test=report-blocked-file-uri.php","disposition":"enforce","blocked-uri":"file","status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-file-uri.php","referrer":"","violated-directive":"img-src","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri resources/save-report.php?test=report-blocked-file-uri.php","disposition":"enforce","blocked-uri":"file","status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt
index 033af2d..4746e81 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt
@@ -6,4 +6,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-uri-cross-origin.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-uri-cross-origin.php","referrer":"","violated-directive":"img-src 'none'","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri resources/save-report.php?test=report-blocked-uri-cross-origin.php","disposition":"report","blocked-uri":"http://localhost:8080/security/resources/abe.png","line-number":4,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-uri-cross-origin.php","status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-uri-cross-origin.php","referrer":"","violated-directive":"img-src","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri resources/save-report.php?test=report-blocked-uri-cross-origin.php","disposition":"report","blocked-uri":"http://localhost:8080/security/resources/abe.png","line-number":4,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-uri-cross-origin.php","status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt
index 621cbcf..12c7f9a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt
@@ -6,4 +6,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-uri.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-uri.php","referrer":"","violated-directive":"img-src 'none'","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri resources/save-report.php?test=report-blocked-uri.php","disposition":"report","blocked-uri":"http://127.0.0.1:8000/security/resources/abe.png","line-number":4,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-uri.php","status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-uri.php","referrer":"","violated-directive":"img-src","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri resources/save-report.php?test=report-blocked-uri.php","disposition":"report","blocked-uri":"http://127.0.0.1:8000/security/resources/abe.png","line-number":4,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-blocked-uri.php","status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt
index 54f2ff6..986aa1b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt
@@ -6,4 +6,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-cross-origin-no-cookies.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-cross-origin-no-cookies.php","referrer":"","violated-directive":"img-src 'none'","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri http://localhost:8080/security/contentSecurityPolicy/resources/save-report.php?test=report-cross-origin-no-cookies.php","disposition":"enforce","blocked-uri":"http://127.0.0.1:8000/security/resources/abe.png","status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-cross-origin-no-cookies.php","referrer":"","violated-directive":"img-src","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri http://localhost:8080/security/contentSecurityPolicy/resources/save-report.php?test=report-cross-origin-no-cookies.php","disposition":"enforce","blocked-uri":"http://127.0.0.1:8000/security/resources/abe.png","status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-only-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-only-expected.txt
index 61670f91..d658f98 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-only-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-only-expected.txt
@@ -7,4 +7,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-only.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-only.php","referrer":"","violated-directive":"script-src 'self'","effective-directive":"script-src","original-policy":"script-src 'self'; report-uri resources/save-report.php?test=report-only.php","disposition":"report","blocked-uri":"inline","line-number":2,"status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-only.php","referrer":"","violated-directive":"script-src","effective-directive":"script-src","original-policy":"script-src 'self'; report-uri resources/save-report.php?test=report-only.php","disposition":"report","blocked-uri":"inline","line-number":2,"status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt
index 749fb83..4f3e2ba 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt
@@ -6,4 +6,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-only-from-header.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-only-from-header.php","referrer":"","violated-directive":"script-src 'self'","effective-directive":"script-src","original-policy":"script-src 'self'; report-uri resources/save-report.php?test=report-only-from-header.php","disposition":"report","blocked-uri":"inline","line-number":1,"status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-only-from-header.php","referrer":"","violated-directive":"script-src","effective-directive":"script-src","original-policy":"script-src 'self'; report-uri resources/save-report.php?test=report-only-from-header.php","disposition":"report","blocked-uri":"inline","line-number":1,"status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt
index 87ccc22..cc995c8 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt
@@ -8,4 +8,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-same-origin-with-cookies.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-same-origin-with-cookies.php","referrer":"","violated-directive":"img-src 'none'","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri /security/contentSecurityPolicy/resources/save-report.php?test=report-same-origin-with-cookies.php","disposition":"enforce","blocked-uri":"http://127.0.0.1:8000/security/resources/abe.png","line-number":17,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-same-origin-with-cookies.php","status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-same-origin-with-cookies.php","referrer":"","violated-directive":"img-src","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri /security/contentSecurityPolicy/resources/save-report.php?test=report-same-origin-with-cookies.php","disposition":"enforce","blocked-uri":"http://127.0.0.1:8000/security/resources/abe.png","line-number":17,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-same-origin-with-cookies.php","status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-expected.txt
index 9eeeacb..cd04053 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-expected.txt
@@ -6,4 +6,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri.php","referrer":"","violated-directive":"script-src 'self'","effective-directive":"script-src","original-policy":"script-src 'self'; report-uri resources/save-report.php?test=report-uri.php","disposition":"enforce","blocked-uri":"inline","line-number":2,"status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri.php","referrer":"","violated-directive":"script-src","effective-directive":"script-src","original-policy":"script-src 'self'; report-uri resources/save-report.php?test=report-uri.php","disposition":"enforce","blocked-uri":"inline","line-number":2,"status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt
index bca53d36d..47b7be3a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt
@@ -11,4 +11,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/resources/generate-csp-report.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/resources/generate-csp-report.php","referrer":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-from-child-frame.html","violated-directive":"script-src 'self'","effective-directive":"script-src","original-policy":"script-src 'self'; report-uri save-report.php?test=generate-csp-report.php","disposition":"enforce","blocked-uri":"inline","line-number":1,"status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/resources/generate-csp-report.php","referrer":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-from-child-frame.html","violated-directive":"script-src","effective-directive":"script-src","original-policy":"script-src 'self'; report-uri save-report.php?test=generate-csp-report.php","disposition":"enforce","blocked-uri":"inline","line-number":1,"status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt
index 21c8f94..1e00896 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt
@@ -6,4 +6,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-from-inline-javascript.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-from-inline-javascript.php","referrer":"","violated-directive":"img-src 'none'","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri resources/save-report.php?test=report-uri-from-inline-javascript.php","disposition":"enforce","blocked-uri":"http://127.0.0.1:8000/security/resources/abe.png","status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-from-inline-javascript.php","referrer":"","violated-directive":"img-src","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri resources/save-report.php?test=report-uri-from-inline-javascript.php","disposition":"enforce","blocked-uri":"http://127.0.0.1:8000/security/resources/abe.png","status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt
index 4aebfbe..64544db 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt
@@ -6,4 +6,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-from-javascript.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-from-javascript.php","referrer":"","violated-directive":"img-src 'none'","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri resources/save-report.php?test=report-uri-from-javascript.php","disposition":"enforce","blocked-uri":"http://127.0.0.1:8000/security/resources/abe.png","status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-from-javascript.php","referrer":"","violated-directive":"img-src","effective-directive":"img-src","original-policy":"img-src 'none'; report-uri resources/save-report.php?test=report-uri-from-javascript.php","disposition":"enforce","blocked-uri":"http://127.0.0.1:8000/security/resources/abe.png","status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-expected.txt
index 8376757..c8e0956 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-expected.txt
@@ -8,4 +8,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-multiple.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-multiple.php","referrer":"","violated-directive":"img-src http://*","effective-directive":"img-src","original-policy":"img-src http://*; script-src 'self'; report-uri resources/save-report.php?test=report-uri-multiple.php","disposition":"report","blocked-uri":"ftp://blah.test","line-number":8,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-multiple.php","status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-multiple.php","referrer":"","violated-directive":"img-src","effective-directive":"img-src","original-policy":"img-src http://*; script-src 'self'; report-uri resources/save-report.php?test=report-uri-multiple.php","disposition":"report","blocked-uri":"ftp://blah.test","line-number":8,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-multiple.php","status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-reversed-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-reversed-expected.txt
index eb334ea..5b63736 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-reversed-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-reversed-expected.txt
@@ -8,4 +8,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-multiple-reversed.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-multiple-reversed.php","referrer":"","violated-directive":"img-src http://*","effective-directive":"img-src","original-policy":"img-src http://*; script-src 'self'; report-uri resources/save-report.php?test=report-uri-multiple-reversed.php","disposition":"report","blocked-uri":"ftp://blah.test","line-number":8,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-multiple-reversed.php","status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-multiple-reversed.php","referrer":"","violated-directive":"img-src","effective-directive":"img-src","original-policy":"img-src http://*; script-src 'self'; report-uri resources/save-report.php?test=report-uri-multiple-reversed.php","disposition":"report","blocked-uri":"ftp://blah.test","line-number":8,"source-file":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-multiple-reversed.php","status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt
index c926be3..bf6e568 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt
@@ -6,4 +6,4 @@
 HTTP_REFERER: http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-scheme-relative.php
 REQUEST_METHOD: POST
 === POST DATA ===
-{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-scheme-relative.php","referrer":"","violated-directive":"script-src 'self'","effective-directive":"script-src","original-policy":"script-src 'self'; report-uri //127.0.0.1:8080/security/contentSecurityPolicy/resources/save-report.php?test=report-uri-scheme-relative.php","disposition":"enforce","blocked-uri":"inline","line-number":2,"status-code":200}}
+{"csp-report":{"document-uri":"http://127.0.0.1:8000/security/contentSecurityPolicy/report-uri-scheme-relative.php","referrer":"","violated-directive":"script-src","effective-directive":"script-src","original-policy":"script-src 'self'; report-uri //127.0.0.1:8080/security/contentSecurityPolicy/resources/save-report.php?test=report-uri-scheme-relative.php","disposition":"enforce","blocked-uri":"inline","line-number":2,"status-code":200}}
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-expected.txt
index 680af36..efeacc6b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-expected.txt
@@ -9,7 +9,7 @@
 PASS window.e.documentURI is "http://127.0.0.1:8000/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image.html"
 PASS window.e.referrer is ""
 PASS window.e.blockedURI is "http://localhost:8000/security/resources/abe.png"
-PASS window.e.violatedDirective is "img-src 'none'"
+PASS window.e.violatedDirective is "img-src"
 PASS window.e.effectiveDirective is "img-src"
 PASS window.e.originalPolicy is "img-src 'none'"
 PASS window.e.disposition is "enforce"
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script-expected.txt
index ca04e6c..65767df 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script-expected.txt
@@ -9,7 +9,7 @@
 PASS window.e.documentURI is "http://127.0.0.1:8000/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script.html"
 PASS window.e.referrer is ""
 PASS window.e.blockedURI is "http://127.0.0.1:8000/security/resources/abe.png"
-PASS window.e.violatedDirective is "img-src 'none'"
+PASS window.e.violatedDirective is "img-src"
 PASS window.e.effectiveDirective is "img-src"
 PASS window.e.originalPolicy is "img-src 'none'"
 PASS window.e.disposition is "enforce"
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script.html
index 74747f8f..f213d44 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script.html
@@ -11,7 +11,7 @@
             'documentURI': document.location.toString(),
             'referrer': document.referrer,
             'blockedURI': 'http://127.0.0.1:8000/security/resources/abe.png',
-            'violatedDirective': 'img-src \'none\'',
+            'violatedDirective': 'img-src',
             'effectiveDirective': 'img-src',
             'originalPolicy': 'img-src \'none\'',
             'disposition': 'enforce',
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image.html
index 1d8eded..3862836 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image.html
@@ -11,7 +11,7 @@
             'documentURI': document.location.toString(),
             'referrer': document.referrer,
             'blockedURI': 'http://localhost:8000/security/resources/abe.png',
-            'violatedDirective': 'img-src \'none\'',
+            'violatedDirective': 'img-src',
             'effectiveDirective': 'img-src',
             'originalPolicy': 'img-src \'none\'',
             'disposition': 'enforce',
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-expected.txt
index a08dc5f..2985942 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-expected.txt
@@ -9,7 +9,7 @@
 PASS window.e.documentURI is "http://127.0.0.1:8000/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image.html"
 PASS window.e.referrer is ""
 PASS window.e.blockedURI is "http://127.0.0.1:8000/security/resources/abe.png"
-PASS window.e.violatedDirective is "img-src 'none'"
+PASS window.e.violatedDirective is "img-src"
 PASS window.e.effectiveDirective is "img-src"
 PASS window.e.originalPolicy is "img-src 'none'"
 PASS window.e.disposition is "enforce"
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-from-script-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-from-script-expected.txt
index b8d03f7..981bc26 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-from-script-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-from-script-expected.txt
@@ -9,7 +9,7 @@
 PASS window.e.documentURI is "http://127.0.0.1:8000/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-from-script.html"
 PASS window.e.referrer is ""
 PASS window.e.blockedURI is "http://127.0.0.1:8000/security/resources/abe.png"
-PASS window.e.violatedDirective is "img-src 'none'"
+PASS window.e.violatedDirective is "img-src"
 PASS window.e.effectiveDirective is "img-src"
 PASS window.e.originalPolicy is "img-src 'none'"
 PASS window.e.disposition is "enforce"
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-from-script.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-from-script.html
index 581a399..3060721 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-from-script.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-from-script.html
@@ -11,7 +11,7 @@
             'documentURI': document.location.toString(),
             'referrer': document.referrer,
             'blockedURI': 'http://127.0.0.1:8000/security/resources/abe.png',
-            'violatedDirective': 'img-src \'none\'',
+            'violatedDirective': 'img-src',
             'effectiveDirective': 'img-src',
             'originalPolicy': 'img-src \'none\'',
             'disposition': 'enforce',
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image.html
index cb3d1fb..88a7693 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image.html
@@ -11,7 +11,7 @@
             'documentURI': document.location.toString(),
             'referrer': document.referrer,
             'blockedURI': 'http://127.0.0.1:8000/security/resources/abe.png',
-            'violatedDirective': 'img-src \'none\'',
+            'violatedDirective': 'img-src',
             'effectiveDirective': 'img-src',
             'originalPolicy': 'img-src \'none\'',
             'disposition': 'enforce',
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
index d9e733a..471a1bc 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -1086,7 +1086,7 @@
     }
   }
   init.setReferrer(document->referrer());
-  init.setViolatedDirective(directiveText);
+  init.setViolatedDirective(effectiveDirective);
   init.setEffectiveDirective(effectiveDirective);
   init.setOriginalPolicy(header);
   init.setDisposition(headerType == ContentSecurityPolicyHeaderTypeEnforce