Chromium Code Reviews| Index: LayoutTests/crypto/subtle/hkdf-exportKey.html |
| diff --git a/LayoutTests/crypto/subtle/hkdf-exportKey.html b/LayoutTests/crypto/subtle/hkdf-exportKey.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cdf03e85a66c1f17f2efdd56f483c7157b5f85ff |
| --- /dev/null |
| +++ b/LayoutTests/crypto/subtle/hkdf-exportKey.html |
| @@ -0,0 +1,34 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<script src="../../resources/js-test.js"></script> |
| +<script src="resources/common.js"></script> |
| +</head> |
| +<body> |
| +<p id="description"></p> |
| +<div id="console"></div> |
| + |
| +<script> |
| +description("Test that HKDF does not support exportKey()."); |
| + |
| +jsTestIsAsync = true; |
| + |
| +kHkdfKey = "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"; |
| + |
| +var extractable = true; |
| +Promise.resolve(null).then(function(result) { |
| + // set up the test by creating an HKDF key and an RSA key |
|
eroman
2015/01/12 22:35:23
This comment is false.
nharper
2015/01/13 00:11:16
Done.
|
| + return crypto.subtle.importKey("raw", hexStringToUint8Array(kHkdfKey), {name: "HKDF"}, extractable, ['deriveKey', 'deriveBits']); |
| +}).then(function(result) { |
| + hkdfKey = result; |
| + |
| + debug("\nCalling exportKey() on an HKDF key..."); |
| + return crypto.subtle.exportKey("raw", hkdfKey); |
| +}).then(failAndFinishJSTest, function(result) { |
| + logError(result); |
| +}).then(finishJSTest); |
| + |
| +</script> |
| + |
| +</body> |
| +</html> |