Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1349)

Side by Side Diff: LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-allowed.html

Issue 622783004: Implementation of subresource integrity attribute for style sheets. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="stylesheet" href="style-1-of-3.css" integrity="ni://sha256;Rv LeYLQyPa/ZQk95Rj0XQpfsoBHW9Vrqb3zwo5DScrI="></link>
5 <link rel="stylesheet" href="style-2-of-3.css" integrity="ni://sha384;j1 bGpDxu0bZAb4jBJzciDWuVUuOTXlLvB9WNKDh7Gik9ygF6CctjgYISUwShHmFM"></link>
6 <link rel="stylesheet" href="style-3-of-3.css" integrity="ni://sha512;P3 02RfA5c/H9Ao/miirSIPVBr3uxOdTzm8IzaGwidneeOOwuyTfOhCp8+c1yg+W16rKf1IW/+4TxD0yAKd kV+Q=="></link>
7 </head>
8 <body>
9 <script>
10 if (window.testRunner)
11 testRunner.dumpAsText();
12 </script>
13 <p id="p1">Test 1</p>
14 <p id="p2">Test 2</p>
15 <p id="p3">Test 3</p>
16 <script>
17 var color = window.getComputedStyle(document.querySelector('#p1')).color ;
18 if (color === "rgb(0, 128, 0)")
19 alert("PASS (1/3): The 'p#1' element's text is green, which means th e style was correctly applied.");
20 else
21 alert("FAIL (1/3): The 'p#1' element's text is " + color + ", which means the style was incorrectly applied.");
22 var color = window.getComputedStyle(document.querySelector('#p2')).color ;
23 if (color === "rgb(0, 128, 0)")
24 alert("PASS (2/3): The 'p#2' element's text is green, which means th e style was correctly applied.");
25 else
26 alert("FAIL (2/3): The 'p#2' element's text is " + color + ", which means the style was incorrectly applied.");
27 var color = window.getComputedStyle(document.querySelector('#p3')).color ;
28 if (color === "rgb(0, 128, 0)")
29 alert("PASS (3/3): The 'p#3' element's text is green, which means th e style was correctly applied.");
30 else
31 alert("FAIL (3/3): The 'p#1' element's text is " + color + ", which means the style was incorrectly applied.");
32 </script>
33 </body>
34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698