Index: LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-allowed.html |
diff --git a/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-allowed.html b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-allowed.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b9678e576a31dff5186daa43343e0880fac653c1 |
--- /dev/null |
+++ b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-allowed.html |
@@ -0,0 +1,29 @@ |
+<!DOCTYPE html> |
+<html> |
+ <head> |
+ <title>Subresource integrity allowed style resources</title> |
+ <script src="../../resources/testharness.js"></script> |
+ |
+ <link rel="stylesheet" href="style-1-of-3.css" integrity="ni://sha256;RvLeYLQyPa/ZQk95Rj0XQpfsoBHW9Vrqb3zwo5DScrI="></link> |
+ <link rel="stylesheet" href="style-2-of-3.css" integrity="ni://sha384;j1bGpDxu0bZAb4jBJzciDWuVUuOTXlLvB9WNKDh7Gik9ygF6CctjgYISUwShHmFM"></link> |
+ <link rel="stylesheet" href="style-3-of-3.css" integrity="ni://sha512;P302RfA5c/H9Ao/miirSIPVBr3uxOdTzm8IzaGwidneeOOwuyTfOhCp8+c1yg+W16rKf1IW/+4TxD0yAKdkV+Q=="></link> |
+ </head> |
+ <body> |
+ <script> |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ </script> |
+ <p id="p1">Test 1</p> |
+ <p id="p2">Test 2</p> |
+ <p id="p3">Test 3</p> |
+ |
+ <script> |
+ var color = window.getComputedStyle(document.querySelector('#p1')).color; |
+ assert_equals(color, "rgb(0, 128, 0)", "The p#1 element's text should be green."); |
+ color = window.getComputedStyle(document.querySelector('#p2')).color; |
+ assert_equals(color, "rgb(0, 128, 0)", "The p#2 element's text should be green."); |
+ color = window.getComputedStyle(document.querySelector('#p3')).color; |
+ assert_equals(color, "rgb(0, 128, 0)", "The p#3 element's text should be green."); |
+ </script> |
+ </body> |
+</html> |