OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <head> | 2 <head> |
3 <title>SRI on cross origin CORS enabled script, with bad integrity</title> | 3 <title>SRI on cross origin CORS enabled script, with bad integrity</title> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <script src="/resources/testharness.js"></script> | 6 <script src="/resources/testharness.js"></script> |
7 <script src="/resources/testharnessreport.js"></script> | 7 <script src="/resources/testharnessreport.js"></script> |
8 <script> | 8 <script> |
9 var result = ''; | 9 var result = ''; |
10 var scriptLoaded = function() { | 10 var scriptLoaded = function() { |
| 11 assert_unreached('Script loaded.'); |
| 12 done(); |
| 13 }; |
| 14 var scriptError = function() { |
11 assert_equals(result, '', 'Script did not run.'); | 15 assert_equals(result, '', 'Script did not run.'); |
12 done(); | 16 done(); |
13 }; | 17 }; |
14 var scriptError = function() { | |
15 assert_unreached('Script error.'); | |
16 done(); | |
17 }; | |
18 </script> | 18 </script> |
19 <script crossorigin integrity="ni:///sha256;deadbeef" src="http://localhost:
8000/security/resources/cors-script.php?value=ran" onload="scriptLoaded();" oner
ror="scriptError();"></script> | 19 <script crossorigin integrity="ni:///sha256;deadbeef" src="http://localhost:
8000/security/resources/cors-script.php?value=ran" onload="scriptLoaded();" oner
ror="scriptError();"></script> |
20 </body> | 20 </body> |
21 </html> | 21 </html> |
OLD | NEW |