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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 debug("finish() and then finish()"); | 173 debug("finish() and then finish()"); |
174 op = crypto.subtle.digest({name: 'sha-1'}); | 174 op = crypto.subtle.digest({name: 'sha-1'}); |
175 op.finish().then(function(value) { | 175 op.finish().then(function(value) { |
176 resultHandler(value, true); | 176 resultHandler(value, true); |
177 op.finish().then(resultHandler, rejectHandler); | 177 op.finish().then(resultHandler, rejectHandler); |
178 }, failHandler); | 178 }, failHandler); |
179 }, | 179 }, |
180 | 180 |
181 function() | 181 function() |
182 { | 182 { |
| 183 debug("SHA-256 rejects (dummy implementation)"); |
| 184 op = crypto.subtle.digest({name: 'sha-256'}); |
| 185 op.finish().then(resultHandler, rejectHandler); |
| 186 }, |
| 187 |
| 188 function() |
| 189 { |
183 op = crypto.subtle.digest({name: 'sha-1'}); | 190 op = crypto.subtle.digest({name: 'sha-1'}); |
184 shouldThrow("op.process(null)"); | 191 shouldThrow("op.process(null)"); |
185 shouldThrow("op.process()"); | 192 shouldThrow("op.process()"); |
186 shouldThrow("op.process(-1)"); | 193 shouldThrow("op.process(-1)"); |
187 startNextTest(); | 194 startNextTest(); |
188 }, | 195 }, |
189 ]; | 196 ]; |
190 | 197 |
191 // Begin! | 198 // Begin! |
192 startNextTest(); | 199 startNextTest(); |
193 | 200 |
194 </script> | 201 </script> |
195 | 202 |
196 <script src="../fast/js/resources/js-test-post.js"></script> | 203 <script src="../fast/js/resources/js-test-post.js"></script> |
197 </body> | 204 </body> |
198 </html> | 205 </html> |
OLD | NEW |