Index: LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-no-cors.html |
diff --git a/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-no-cors.html b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-no-cors.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..057362cf47923984a56227222a4181af7cea5c85 |
--- /dev/null |
+++ b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-no-cors.html |
@@ -0,0 +1,23 @@ |
+<!DOCTYPE html> |
+<head> |
+ <style>.id1 { background-color: red }</style> |
+ <link rel="stylesheet" |
+ integrity="ni:///sha256;deadbeef" |
+ href="http://localhost:8000/security/resources/cors-style.php?cors=false"></link> |
+</head> |
+<body> |
+ <script src="/js-test-resources/js-test.js"></script> |
+ <script> |
+ window.jsTestIsAsync = true; |
+ description("The test passes if the style loads and modifies the div to be yellow but that there is also a console error that the integrity cannot be enforced on a non-CORS enabled resource."); |
+ |
+ window.onload = function () { |
+ var ele = document.getElementById('id1'); |
+ window.divBackground = window.getComputedStyle(ele, null).getPropertyValue('background-color'); |
+ shouldBeEqualToString("divBackground", "rgb(255, 255, 0)"); |
+ finishJSTest(); |
+ }; |
+ </script> |
+ <div id="id1" class="id1"></div> |
+</body> |
+</html> |