Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(714)

Side by Side Diff: LayoutTests/crypto/digest.html

Issue 20421002: WebCrypto: Test error delivery during process(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/crypto/digest-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/crypto/digest-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698