OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
| 3 <head> |
| 4 <title>SRI invalid integrity attributes</title> |
| 5 <script src="/resources/testharness.js"></script> |
| 6 <script src="/resources/testharnessreport.js"></script> |
| 7 </head> |
3 <body> | 8 <body> |
4 <script> | 9 <script> |
5 if (window.testRunner) | 10 var count = 0; |
6 testRunner.dumpAsText(); | 11 function checkDone() { |
| 12 if (count == 2) |
| 13 done(); |
| 14 count++; |
| 15 } |
| 16 var success = checkDone; |
| 17 function scriptError() { |
| 18 assert_unreached("Script failed to load."); |
| 19 checkDone(); |
| 20 } |
7 </script> | 21 </script> |
8 <p> | 22 <script src='call-success.js' onerror="scriptError();" integrity="sha256
;B0_62fJSJFrdjEFR9ba04m_D-LHQ-zG6PGcaR0Trpxg="></script> |
9 This test passes if no 'FAIL' alert appears. | 23 <script src='call-success.js' onerror="scriptError();" integrity="sha256
:B0_62fJSJFrdjEFR9ba04m_D-LHQ-zG6PGcaR0Trpxg="></script> |
10 </p> | 24 <script src='call-success.js' onerror="scriptError();" integrity="sha256
-(B0_62fJSJFrdjEFR9ba04m_D-LHQ-zG6PGcaR0Trpxg=)"></script> |
11 <script src='fail.js' integrity="sha256;yM5ZyzNsyKfaXRY78zSGapeQKtl0oGdp
PpYxgwl8XW8="></script> | |
12 <script src='fail.js' integrity="sha256:yM5ZyzNsyKfaXRY78zSGapeQKtl0oGdp
PpYxgwl8XW8="></script> | |
13 <script src='fail.js' integrity="sha256-(yM5ZyzNsyKfaXRY78zSGapeQKtl0oGd
pPpYxgwl8XW8=)"></script> | |
14 </body> | 25 </body> |
15 </html> | 26 </html> |
OLD | NEW |