Title: [195374] trunk/LayoutTests
Revision
195374
Author
dba...@webkit.org
Date
2016-01-20 13:32:05 -0800 (Wed, 20 Jan 2016)

Log Message

CSP: Add tests to ensure that alternative text of an image is rendered when CSP blocks its load
https://bugs.webkit.org/show_bug.cgi?id=153280

Reviewed by Alexey Proskuryakov.

These tests were inspired by the Blink test
<https://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-blocked-alt-content.html?revision=186800>.

* http/tests/security/contentSecurityPolicy/image-blocked-alt-text-expected.html: Added.
* http/tests/security/contentSecurityPolicy/image-blocked-alt-text.html: Added.
* http/tests/security/contentSecurityPolicy/image-data-URL-blocked-alt-text-expected.html: Added.
* http/tests/security/contentSecurityPolicy/image-data-URL-blocked-alt-text.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (195373 => 195374)


--- trunk/LayoutTests/ChangeLog	2016-01-20 21:00:18 UTC (rev 195373)
+++ trunk/LayoutTests/ChangeLog	2016-01-20 21:32:05 UTC (rev 195374)
@@ -1,5 +1,20 @@
 2016-01-20  Daniel Bates  <daba...@apple.com>
 
+        CSP: Add tests to ensure that alternative text of an image is rendered when CSP blocks its load
+        https://bugs.webkit.org/show_bug.cgi?id=153280
+
+        Reviewed by Alexey Proskuryakov.
+
+        These tests were inspired by the Blink test
+        <https://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-blocked-alt-content.html?revision=186800>.
+
+        * http/tests/security/contentSecurityPolicy/image-blocked-alt-text-expected.html: Added.
+        * http/tests/security/contentSecurityPolicy/image-blocked-alt-text.html: Added.
+        * http/tests/security/contentSecurityPolicy/image-data-URL-blocked-alt-text-expected.html: Added.
+        * http/tests/security/contentSecurityPolicy/image-data-URL-blocked-alt-text.html: Added.
+
+2016-01-20  Daniel Bates  <daba...@apple.com>
+
         CSP: Merge from Blink many new tests and changes to existing tests
         https://bugs.webkit.org/show_bug.cgi?id=153277
         <rdar://problem/24260782>

Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-blocked-alt-text-expected.html (0 => 195374)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-blocked-alt-text-expected.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-blocked-alt-text-expected.html	2016-01-20 21:32:05 UTC (rev 195374)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the alternative text of an image is rendered when the CSP policy of the page blocks its load.</p>
+<img src="" width="50" height="50" alt="alt text">
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-blocked-alt-text.html (0 => 195374)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-blocked-alt-text.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-blocked-alt-text.html	2016-01-20 21:32:05 UTC (rev 195374)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Security-Policy" content="img-src 'none'">
+</head>
+<body>
+<p>This tests that the alternative text of an image is rendered when the CSP policy of the page blocks its load.</p>
+<img src="" width="50" height="50" alt="alt text">
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-data-URL-blocked-alt-text-expected.html (0 => 195374)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-data-URL-blocked-alt-text-expected.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-data-URL-blocked-alt-text-expected.html	2016-01-20 21:32:05 UTC (rev 195374)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the alternative text of a data URL image is rendered when the CSP policy of the page blocks its load.</p>
+<img src="" width="50" height="50" alt="alt text">
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-data-URL-blocked-alt-text.html (0 => 195374)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-data-URL-blocked-alt-text.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/image-data-URL-blocked-alt-text.html	2016-01-20 21:32:05 UTC (rev 195374)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Security-Policy" content="img-src 'self'">
+</head>
+<body>
+<p>This tests that the alternative text of a data URL image is rendered when the CSP policy of the page blocks its load.</p>
+<img src="" width="50" height="50" alt="alt text">
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to