Index: LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-blocked.html |
diff --git a/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-blocked.html b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-blocked.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c806e927a64f061bed97daa4e721b4685e5193b0 |
--- /dev/null |
+++ b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-blocked.html |
@@ -0,0 +1,34 @@ |
+<!DOCTYPE html> |
+<html> |
+ <head> |
+ <link rel="stylesheet" href="style-1-of-3.css" integrity="ni://sha256;BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE="></link> |
+ <link rel="stylesheet" href="style-2-of-3.css" integrity="ni://sha384;XVVXBGoYw6AJOh9J/Z8pBDMVVPfkBpngexkA7JqZu8d5GENND6TEIup/tA1v5GPr"></link> |
+ <link rel="stylesheet" href="style-3-of-3.css" integrity="ni://sha512;tbUPioKbVBplr0b1ucnWB57SJWt4x9dOE0Vy2mzCXvH3FepqDZ+07yMK81ytlg0MPaIrPAjcHqba5csorDWtKg=="></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; |
+ if (color === "rgb(0, 128, 0)") |
Mike West
2014/10/02 18:52:44
Please convert these to testharness.js tests, and
jww
2014/10/02 22:12:18
Done.
|
+ alert("FAIL (1/3): The 'p#1' element's text is green, which means the style was incorrectly loaded."); |
+ else |
+ alert("PASS (1/3): The 'p#1' element's text is " + color + ", which means the style was correctly blocked."); |
+ var color = window.getComputedStyle(document.querySelector('#p2')).color; |
+ if (color === "rgb(0, 128, 0)") |
+ alert("FAIL (2/3): The 'p#2' element's text is green, which means the style was incorrectly loaded."); |
+ else |
+ alert("PASS (2/3): The 'p#2' element's text is " + color + ", which means the style was correctly blocked."); |
+ var color = window.getComputedStyle(document.querySelector('#p3')).color; |
+ if (color === "rgb(0, 128, 0)") |
+ alert("FAIL (3/3): The 'p#3' element's text is green, which means the style was incorrectly loaded."); |
+ else |
+ alert("PASS (3/3): The 'p#3' element's text is " + color + ", which means the style was correctly blocked."); |
+ </script> |
+ </body> |
+</html> |