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

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

Issue 170243007: [webcrypto] Make all of the crypto.subtle method failures asynchronous. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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="../resources/js-test.js"></script> 4 <script src="../resources/js-test.js"></script>
5 <script src="resources/common.js"></script> 5 <script src="resources/common.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <p id="description"></p> 8 <p id="description"></p>
9 <div id="console"></div> 9 <div id="console"></div>
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 }); 111 });
112 } 112 }
113 113
114 // Pass invalid data to digest() 114 // Pass invalid data to digest()
115 shouldThrow("crypto.subtle.digest({name: 'sha-1'})"); 115 shouldThrow("crypto.subtle.digest({name: 'sha-1'})");
116 shouldThrow("crypto.subtle.digest({name: 'sha-1'}, null)"); 116 shouldThrow("crypto.subtle.digest({name: 'sha-1'}, null)");
117 shouldThrow("crypto.subtle.digest({name: 'sha-1'}, 10)"); 117 shouldThrow("crypto.subtle.digest({name: 'sha-1'}, 10)");
118 118
119 // Pass invalid algorithmIdentifiers to digest() 119 // Pass invalid algorithmIdentifiers to digest()
120 data = new Uint8Array([0]); 120 data = new Uint8Array([0]);
121 shouldThrow("crypto.subtle.digest({name: 'sha'}, data)"); 121 shouldRejectPromiseWithNull("crypto.subtle.digest({name: 'sha'}, data)");
122 shouldThrow("crypto.subtle.digest(null, data)"); 122 shouldThrow("crypto.subtle.digest(null, data)");
123 shouldThrow("crypto.subtle.digest({}, data)"); 123 shouldRejectPromiseWithNull("crypto.subtle.digest({}, data)");
124 124
125 completeTestWhenAllTasksDone(); 125 completeTestWhenAllTasksDone();
126 126
127 </script> 127 </script>
128 128
129 </body> 129 </body>
130 </html> 130 </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