OLD | NEW |
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 Loading... |
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> |
OLD | NEW |