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

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

Issue 1166003004: SRI fail open on ineligible resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove a bunch of -expected.txt files Created 5 years, 6 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <title>SRI on cross origin CORS enabled style, without CORS fetch</title> 3 <title>SRI on cross origin CORS enabled style, without CORS fetch</title>
4 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script> 5 <script src="/resources/testharnessreport.js"></script>
6 <script> 6 <script>
7 function styleLoad() {
8 assert_unreached("Style loaded.");
9 }
10 function styleError() { 7 function styleError() {
11 assert_true(true, "Style did not load."); 8 assert_unreached("Style did not load.");
12 } 9 }
13 </script> 10 </script>
14 <style>.id1 { background-color: red }</style> 11 <style>.id1 { background-color: red }</style>
15 <link rel="stylesheet" 12 <link rel="stylesheet"
16 onload="styleLoad()"
17 onerror="styleError();" 13 onerror="styleError();"
18 integrity="sha256-fy1lC6jbv7rOG6Flb00n5PYLggqe25IcE6QlZf8KtwI=" 14 integrity="sha256-fy1lC6jbv7rOG6Flb00n5PYLggqe25IcE6QlZf8KtwI="
19 href="http://localhost:8000/security/resources/cors-style.php"></link> 15 href="http://localhost:8000/security/resources/cors-style.php"></link>
20 </head> 16 </head>
21 <body> 17 <body>
22 <script> 18 <script>
23 window.onload = function () { 19 window.onload = function () {
24 var ele = document.getElementById('id1'); 20 var ele = document.getElementById('id1');
25 var divBackground = window.getComputedStyle(ele, null).getPropertyVa lue('background-color'); 21 var divBackground = window.getComputedStyle(ele, null).getPropertyVa lue('background-color');
26 assert_equals(divBackground, "rgb(255, 0, 0)"); 22 assert_equals(divBackground, "rgb(255, 255, 0)");
27 done(); 23 done();
28 }; 24 };
29 </script> 25 </script>
30 <div id="id1" class="id1"></div> 26 <div id="id1" class="id1"></div>
31 </body> 27 </body>
32 </html> 28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698