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

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

Issue 179353002: [webcrypto] Add the KeyAlgorithm interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase yet again (another conflict) 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
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 10 matching lines...) Expand all
21 shouldRejectPromiseWithNull("crypto.subtle.exportKey(null, keys.aesCbcJustDe crypt)"); 21 shouldRejectPromiseWithNull("crypto.subtle.exportKey(null, keys.aesCbcJustDe crypt)");
22 shouldRejectPromiseWithNull("crypto.subtle.exportKey('invalid', keys.aesCbcJ ustDecrypt)"); 22 shouldRejectPromiseWithNull("crypto.subtle.exportKey('invalid', keys.aesCbcJ ustDecrypt)");
23 23
24 // Invalid keys 24 // Invalid keys
25 shouldThrow("crypto.subtle.exportKey('raw', null)"); 25 shouldThrow("crypto.subtle.exportKey('raw', null)");
26 shouldThrow("crypto.subtle.exportKey('raw', 3)"); 26 shouldThrow("crypto.subtle.exportKey('raw', 3)");
27 27
28 shouldBe("keys.aesCbcJustDecrypt.extractable", "false") 28 shouldBe("keys.aesCbcJustDecrypt.extractable", "false")
29 shouldRejectPromiseWithNull("crypto.subtle.exportKey('raw', keys.aesCbcJustD ecrypt)"); 29 shouldRejectPromiseWithNull("crypto.subtle.exportKey('raw', keys.aesCbcJustD ecrypt)");
30 30
31 // TODO(eroman): exportKey() is not implemented. 31 return crypto.subtle.exportKey('raw', keys.aesCbc);
32 }).then(function(result) {
33 bytesShouldMatchHexString("Key bytes", "3136206279746573206f66206b657921", r esult);
34
35 return crypto.subtle.exportKey('spki', keys.rsaSsaSha1Public);
36 }).then(function(result) {
37 bytesShouldMatchHexString("Key bytes", kPublicKeySpkiDerHex, result);
32 })); 38 }));
33 39
34 completeTestWhenAllTasksDone(); 40 completeTestWhenAllTasksDone();
35 41
36 </script> 42 </script>
37 43
38 </body> 44 </body>
39 </html> 45 </html>
OLDNEW
« no previous file with comments | « LayoutTests/crypto/encrypt-decrypt-expected.txt ('k') | LayoutTests/crypto/exportKey-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698