CSP: 'sandbox' should be ignored in report-only mode
https://bugs.webkit.org/show_bug.cgi?id=153167
<rdar://problem/22708669>

Reviewed by Brent Fulgham.

Source/WebCore:

Merged from Blink (patch by Mike West):
<https://src.chromium.org/viewvc/blink?revision=165322&view=revision>

* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportInvalidDirectiveInReportOnlyMode): Added. Logs a
console message to the console to explain that the specified directive is invalid in
report-only mode.
* page/csp/ContentSecurityPolicy.h:
* page/csp/ContentSecurityPolicyDirectiveList.cpp:
(WebCore::ContentSecurityPolicyDirectiveList::applySandboxPolicy): Do not apply sandbox
policy when in report-only mode and call ContentSecurityPolicy::reportInvalidDirectiveInReportOnlyMode()
to log a message to the console.

LayoutTests:

Remove the entry from the TestExpectations file for the test
http/tests/security/contentSecurityPolicy/sandbox-report-only.html as it now passes.

* TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@196582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed