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

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

Issue 23164012: WebCrypto: Remove support for multi-part operations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Sync to tot Created 7 years, 4 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 | « LayoutTests/crypto/digest-expected.txt ('k') | LayoutTests/crypto/importKey-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 <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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 shouldBe("key.algorithm.name", "'AES-CBC'") 149 shouldBe("key.algorithm.name", "'AES-CBC'")
150 shouldBe("key.usages.join(',')", "''") 150 shouldBe("key.usages.join(',')", "''")
151 151
152 startNextTest(); 152 startNextTest();
153 }, failHandler); 153 }, failHandler);
154 }, 154 },
155 155
156 function() 156 function()
157 { 157 {
158 keyFormat = "spki"; 158 keyFormat = "spki";
159 data = asciiToArrayBuffer("reject"); 159 data = asciiToArrayBuffer("error");
160 algorithm = aesCbc; 160 algorithm = aesCbc;
161 extractable = false; 161 extractable = false;
162 keyUsages = []; 162 keyUsages = [];
163 163
164 crypto.subtle.importKey(keyFormat, data, algorithm, extractable, keyUsag es).then( 164 crypto.subtle.importKey(keyFormat, data, algorithm, extractable, keyUsag es).then(
165 failHandler, 165 failHandler,
166 function(value) { 166 function(value) {
167 debug("rejected with " + value); 167 debug("rejected with " + value);
168 startNextTest(); 168 startNextTest();
169 }); 169 });
170 }, 170 },
171 171
172 function() 172 function()
173 { 173 {
174 keyFormat = "spki";
175 data = asciiToArrayBuffer("throw");
176 algorithm = aesCbc;
177 extractable = false;
178 keyUsages = [];
179
180 shouldThrow("crypto.subtle.importKey(keyFormat, data, algorithm, extract able, keyUsages)");
181 startNextTest();
182 },
183
184 function()
185 {
186 keyFormat = "raw"; 174 keyFormat = "raw";
187 data = asciiToArrayBuffer(""); 175 data = asciiToArrayBuffer("");
188 algorithm = aesCbc; 176 algorithm = aesCbc;
189 extractable = true; 177 extractable = true;
190 178
191 // Note contains duplicates and invalid entries. 179 // Note contains duplicates and invalid entries.
192 keyUsages = []; 180 keyUsages = [];
193 181
194 // Invalid format. 182 // Invalid format.
195 shouldThrow("crypto.subtle.importKey('invalid format', data, algorithm, extractable, keyUsages)"); 183 shouldThrow("crypto.subtle.importKey('invalid format', data, algorithm, extractable, keyUsages)");
(...skipping 22 matching lines...) Expand all
218 206
219 ]; 207 ];
220 208
221 // Begin! 209 // Begin!
222 startNextTest(); 210 startNextTest();
223 </script> 211 </script>
224 212
225 <script src="../fast/js/resources/js-test-post.js"></script> 213 <script src="../fast/js/resources/js-test-post.js"></script>
226 </body> 214 </body>
227 </html> 215 </html>
OLDNEW
« no previous file with comments | « LayoutTests/crypto/digest-expected.txt ('k') | LayoutTests/crypto/importKey-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698