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

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

Issue 206483010: [webcrypto] Refactor some layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 <script src="resources/keys.js"></script>
6 </head> 7 </head>
7 <body> 8 <body>
8 <p id="description"></p> 9 <p id="description"></p>
9 <div id="console"></div> 10 <div id="console"></div>
10 11
11 <script> 12 <script>
12 description("Tests cypto.subtle.exportKey."); 13 description("Tests cypto.subtle.exportKey.");
13 14
14 jsTestIsAsync = true; 15 jsTestIsAsync = true;
15 16
(...skipping 11 matching lines...) Expand all
27 28
28 shouldBe("keys.aesCbcJustDecrypt.extractable", "false") 29 shouldBe("keys.aesCbcJustDecrypt.extractable", "false")
29 shouldRejectPromiseWithNull("crypto.subtle.exportKey('raw', keys.aesCbcJustD ecrypt)"); 30 shouldRejectPromiseWithNull("crypto.subtle.exportKey('raw', keys.aesCbcJustD ecrypt)");
30 31
31 return crypto.subtle.exportKey('raw', keys.aesCbc); 32 return crypto.subtle.exportKey('raw', keys.aesCbc);
32 }).then(function(result) { 33 }).then(function(result) {
33 bytesShouldMatchHexString("Key bytes", "3136206279746573206f66206b657921", r esult); 34 bytesShouldMatchHexString("Key bytes", "3136206279746573206f66206b657921", r esult);
34 35
35 return crypto.subtle.exportKey('spki', keys.rsaSsaSha1Public); 36 return crypto.subtle.exportKey('spki', keys.rsaSsaSha1Public);
36 }).then(function(result) { 37 }).then(function(result) {
37 bytesShouldMatchHexString("Key bytes", kPublicKeySpkiDerHex, result); 38 bytesShouldMatchHexString("Key bytes", kKeyData.rsa1.spki, result);
38 })); 39 }));
39 40
40 completeTestWhenAllTasksDone(); 41 completeTestWhenAllTasksDone();
41 42
42 </script> 43 </script>
43 44
44 </body> 45 </body>
45 </html> 46 </html>
OLDNEW
« no previous file with comments | « LayoutTests/crypto/encrypt-decrypt-expected.txt ('k') | LayoutTests/crypto/import-aes-key-bad-length.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698