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

Side by Side Diff: LayoutTests/crypto/subtle/hkdf-importKey-failures.html

Issue 957713004: [WebCrypto] Split LayoutTests/crypto/subtle into per-algorithm directories (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to latest master Created 5 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script src="resources/common.js"></script>
6 </head>
7 <body>
8 <p id="description"></p>
9 <div id="console"></div>
10
11 <script>
12 description("Test inputs to HKDF importKey()");
13
14 jsTestIsAsync = true;
15
16 var extractable = true;
17 rawBytes = new Uint8Array([1, 2]);
18
19 var p = Promise.resolve(null);
20 p.then(function() {
21 debug("\nimportKey() with 'encrypt' usage...");
22 return crypto.subtle.importKey("raw", rawBytes, "HKDF", extractable, ['encry pt']);
23 }).then(failAndFinishJSTest, function(result) {
24 logError(result);
25
26 debug("\nimportKey() with null key data...");
27 return crypto.subtle.importKey("raw", null, "HKDF", extractable, ['deriveKey ']);
28 }).then(failAndFinishJSTest, function(result) {
29 logError(result);
30
31 debug("\nimportKey() with jwk format...");
32 return crypto.subtle.importKey("jwk", {kty: "HKDF"}, "HKDF", extractable, [' deriveKey']);
33 }).then(failAndFinishJSTest, function(result) {
34 logError(result);
35
36 debug("\nimportKey() with spki format...");
37 return crypto.subtle.importKey("spki", rawBytes, "HKDF", extractable, ['deri veKey']);
38 }).then(failAndFinishJSTest, function(result) {
39 logError(result);
40
41 debug("\nimportKey() with empty usages...");
42 return crypto.subtle.importKey("raw", rawBytes, "HKDF", extractable, []);
43 }).then(failAndFinishJSTest, function(result) {
44 logError(result);
45 }).then(finishJSTest, failAndFinishJSTest);
46
47 </script>
48
49 </body>
50 </html>
OLDNEW
« no previous file with comments | « LayoutTests/crypto/subtle/hkdf-exportKey-expected.txt ('k') | LayoutTests/crypto/subtle/hkdf-importKey-failures-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698