| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
| 3 <title>Subresource Integrity</title> | 3 <title>Subresource Integrity</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 <div id="log"></div> | 6 <div id="log"></div> |
| 7 | 7 |
| 8 <script> | 8 <script> |
| 9 var xorigin_anon = location.protocol | 9 var xorigin_anon = location.protocol |
| 10 + '//www1.' + location.hostname + ':' + location.port | 10 + '//www1.' + location.hostname + ':' + location.port |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 141 |
| 142 new SRIScriptTest( | 142 new SRIScriptTest( |
| 143 false, | 143 false, |
| 144 "<crossorigin='anonymous'> with CORS-ineligible resource", | 144 "<crossorigin='anonymous'> with CORS-ineligible resource", |
| 145 xorigin_ineligible, | 145 xorigin_ineligible, |
| 146 "sha256-EKclUXH9SRRUv3FmL7bIEV0z2s3EvzHFxzHKCnfHT/E=", | 146 "sha256-EKclUXH9SRRUv3FmL7bIEV0z2s3EvzHFxzHKCnfHT/E=", |
| 147 "anonymous" | 147 "anonymous" |
| 148 ).execute(); | 148 ).execute(); |
| 149 | 149 |
| 150 new SRIScriptTest( | 150 new SRIScriptTest( |
| 151 false, | |
| 152 "Resource with Refresh header", | |
| 153 "refresh-header.js", | |
| 154 "sha256-ieQAXii4cMmZFLxSRnxfZ1KSyzCjOb+N2rQ6OaVBWyM=" | |
| 155 ).execute(); | |
| 156 | |
| 157 new SRIScriptTest( | |
| 158 false, | |
| 159 "Resource with WWW-Authenticate header", | |
| 160 "www-authenticate-header.js", | |
| 161 "sha256-ztNCkGU1fBB5II5wihGTbFb9F2TIMaHldkbnMlp7G/M=" | |
| 162 ).execute(); | |
| 163 | |
| 164 new SRIScriptTest( | |
| 165 true, | 151 true, |
| 166 "Same-origin script with correct hash, options.", | 152 "Same-origin script with correct hash, options.", |
| 167 "matching-digest.js", | 153 "matching-digest.js", |
| 168 "sha256-EKclUXH9SRRUv3FmL7bIEV0z2s3EvzHFxzHKCnfHT/E=?foo=bar?spam=eggs" | 154 "sha256-EKclUXH9SRRUv3FmL7bIEV0z2s3EvzHFxzHKCnfHT/E=?foo=bar?spam=eggs" |
| 169 ).execute(); | 155 ).execute(); |
| 170 | 156 |
| 171 new SRIScriptTest( | 157 new SRIScriptTest( |
| 172 true, | 158 true, |
| 173 "Same-origin script with unknown algorithm only.", | 159 "Same-origin script with unknown algorithm only.", |
| 174 "matching-digest.js", | 160 "matching-digest.js", |
| 175 "foo666-foolUXH9SRRUv3FmL7bIEV0z2s3EvzHFxzHKCnfHT/E=" | 161 "foo666-foolUXH9SRRUv3FmL7bIEV0z2s3EvzHFxzHKCnfHT/E=" |
| 176 ).execute(); | 162 ).execute(); |
| 177 | 163 |
| 178 </script> | 164 </script> |
| 179 <!-- TODO check cache-poisoned resources, transfer-encoding, 3xx redirect | 165 <!-- TODO check cache-poisoned resources, transfer-encoding, 3xx redirect |
| 180 to resource with matching hash, cross-origin leakage test as in sec5.3 | 166 to resource with matching hash, cross-origin leakage test as in sec5.3 |
| 181 and <link> tags --> | 167 and <link> tags --> |
| OLD | NEW |