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

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

Issue 141413003: [webcrypto] Match the error handling defined by the spec. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 11 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/generateKey-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="../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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // Undefined key usage. 104 // Undefined key usage.
105 // FIXME: http://crbug.com/262383 105 // FIXME: http://crbug.com/262383
106 //shouldThrow("crypto.subtle.importKey(keyFormat, data, algorithm, extractab le, undefined)"); 106 //shouldThrow("crypto.subtle.importKey(keyFormat, data, algorithm, extractab le, undefined)");
107 107
108 // Invalid data 108 // Invalid data
109 shouldThrow("crypto.subtle.importKey(keyFormat, [], algorithm, extractable, keyUsages)"); 109 shouldThrow("crypto.subtle.importKey(keyFormat, [], algorithm, extractable, keyUsages)");
110 shouldThrow("crypto.subtle.importKey(keyFormat, null, algorithm, extractable , keyUsages)"); 110 shouldThrow("crypto.subtle.importKey(keyFormat, null, algorithm, extractable , keyUsages)");
111 111
112 // Missing hash parameter for HMAC. 112 // Missing hash parameter for HMAC.
113 shouldThrow("crypto.subtle.importKey(keyFormat, data, {name: 'hmac'}, extrac table, keyUsages)"); 113 shouldRejectPromiseWithNull("crypto.subtle.importKey(keyFormat, data, {name: 'hmac'}, extractable, keyUsages)");
114 114
115 // SHA-1 doesn't support the importKey operation. 115 // SHA-1 doesn't support the importKey operation.
116 shouldThrow("crypto.subtle.importKey(keyFormat, data, {name: 'sha-1'}, extra ctable, keyUsages)"); 116 shouldThrow("crypto.subtle.importKey(keyFormat, data, {name: 'sha-1'}, extra ctable, keyUsages)");
117 }).then(finishJSTest, failAndFinishJSTest); 117 }).then(finishJSTest, failAndFinishJSTest);
118 118
119 </script> 119 </script>
120 120
121 </body> 121 </body>
122 </html> 122 </html>
OLDNEW
« no previous file with comments | « LayoutTests/crypto/generateKey-expected.txt ('k') | LayoutTests/crypto/importKey-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698