Content Security Policy error message when frame load is blocked does not read well
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jun 2015 15:54:23 +0000 (15:54 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jun 2015 15:54:23 +0000 (15:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146279

Reviewed by Csaba Osztrogonác.

Source/WebCore:

Substitute "Refused to load frame" for "Refused to frame" as the prefix of the error message
emitted when the Content Security Policy of the page blocks a frame load.

* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::checkSourceAndReportViolation):

LayoutTests:

Update expected results.

* http/tests/security/contentSecurityPolicy/frame-src-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/frame-src-redirect-blocked-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185912 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/security/contentSecurityPolicy/frame-src-blocked-expected.txt
LayoutTests/http/tests/security/contentSecurityPolicy/frame-src-redirect-blocked-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/page/ContentSecurityPolicy.cpp

index 82af92c..efa2a91 100644 (file)
@@ -1,5 +1,17 @@
 2015-06-24  Daniel Bates  <dabates@apple.com>
 
+        Content Security Policy error message when frame load is blocked does not read well
+        https://bugs.webkit.org/show_bug.cgi?id=146279
+
+        Reviewed by Csaba Osztrogonác.
+
+        Update expected results.
+
+        * http/tests/security/contentSecurityPolicy/frame-src-blocked-expected.txt:
+        * http/tests/security/contentSecurityPolicy/frame-src-redirect-blocked-expected.txt:
+
+2015-06-24  Daniel Bates  <dabates@apple.com>
+
         LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html always passes
         https://bugs.webkit.org/show_bug.cgi?id=146272
 
index eaeef78..ddeda7c 100644 (file)
@@ -1,3 +1,3 @@
-CONSOLE MESSAGE: Refused to frame 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/alert-fail.html' because it violates the following Content Security Policy directive: "frame-src 'none'".
+CONSOLE MESSAGE: Refused to load frame 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/alert-fail.html' because it violates the following Content Security Policy directive: "frame-src 'none'".
 
 
index 3fae4c5..9e2777f 100644 (file)
@@ -1,3 +1,3 @@
-CONSOLE MESSAGE: Refused to frame 'http://localhost:8000/security/contentSecurityPolicy/resources/alert-fail.html' because it violates the following Content Security Policy directive: "frame-src 127.0.0.1:8000".
+CONSOLE MESSAGE: Refused to load frame 'http://localhost:8000/security/contentSecurityPolicy/resources/alert-fail.html' because it violates the following Content Security Policy directive: "frame-src 127.0.0.1:8000".
 
 
index f08c6ec..e50db38 100644 (file)
@@ -1,3 +1,16 @@
+2015-06-24  Daniel Bates  <dabates@apple.com>
+
+        Content Security Policy error message when frame load is blocked does not read well
+        https://bugs.webkit.org/show_bug.cgi?id=146279
+
+        Reviewed by Csaba Osztrogonác.
+
+        Substitute "Refused to load frame" for "Refused to frame" as the prefix of the error message
+        emitted when the Content Security Policy of the page blocks a frame load.
+
+        * page/ContentSecurityPolicy.cpp:
+        (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
+
 2015-06-11  Sergio Villar Senin  <svillar@igalia.com>
 
         intrinsic size keywords don't work for heights
index ee13e5f..24e2e55 100644 (file)
@@ -971,7 +971,7 @@ bool CSPDirectiveList::checkSourceAndReportViolation(SourceListDirective* direct
     else if (formAction == effectiveDirective)
         prefix = "Refused to send form data to '";
     else if (frameSrc == effectiveDirective)
-        prefix = "Refused to frame '";
+        prefix = "Refused to load frame '";
     else if (imgSrc == effectiveDirective)
         prefix = "Refused to load the image '";
     else if (mediaSrc == effectiveDirective)