Index: LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-cors.html |
diff --git a/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-cors.html b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-cors.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..62222ba8b806d4387a4657333566873b6e624efc |
--- /dev/null |
+++ b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-cors.html |
@@ -0,0 +1,24 @@ |
+<!DOCTYPE html> |
+<head> |
+ <style>.id1 { background-color: red }</style> |
+ <link rel="stylesheet" |
+ crossorigin="anonymous" |
+ integrity="ni:///sha256;fy1lC6jbv7rOG6Flb00n5PYLggqe25IcE6QlZf8KtwI=" |
+ href="http://localhost:8000/security/resources/cors-style.php"></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 without any console error."); |
+ |
+ 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> |