OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../fast/js/resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <p id="description"></p> | 7 <p id="description"></p> |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 | 9 |
10 <script> | 10 <script> |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 function() | 181 function() |
182 { | 182 { |
183 debug("SHA-256 rejects (dummy implementation)"); | 183 debug("SHA-256 rejects (dummy implementation)"); |
184 op = crypto.subtle.digest({name: 'sha-256'}); | 184 op = crypto.subtle.digest({name: 'sha-256'}); |
185 op.finish().then(resultHandler, rejectHandler); | 185 op.finish().then(resultHandler, rejectHandler); |
186 }, | 186 }, |
187 | 187 |
188 function() | 188 function() |
189 { | 189 { |
| 190 debug("Error during process() (dummy implementation rejects inputs over
6 bytes)"); |
| 191 op = crypto.subtle.digest({name: 'sha-1'}); |
| 192 op.process(new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])); |
| 193 op.finish().then(resultHandler, rejectHandler); |
| 194 }, |
| 195 |
| 196 function() |
| 197 { |
190 op = crypto.subtle.digest({name: 'sha-1'}); | 198 op = crypto.subtle.digest({name: 'sha-1'}); |
191 shouldThrow("op.process(null)"); | 199 shouldThrow("op.process(null)"); |
192 shouldThrow("op.process()"); | 200 shouldThrow("op.process()"); |
193 shouldThrow("op.process(-1)"); | 201 shouldThrow("op.process(-1)"); |
194 startNextTest(); | 202 startNextTest(); |
195 }, | 203 }, |
196 ]; | 204 ]; |
197 | 205 |
198 // Begin! | 206 // Begin! |
199 startNextTest(); | 207 startNextTest(); |
200 | 208 |
201 </script> | 209 </script> |
202 | 210 |
203 <script src="../fast/js/resources/js-test-post.js"></script> | 211 <script src="../fast/js/resources/js-test-post.js"></script> |
204 </body> | 212 </body> |
205 </html> | 213 </html> |
OLD | NEW |