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

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

Issue 19776013: WebCrypto: Refactor the WebCryptoOperation interface to support errors. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase onto master 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
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>
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