Index: LayoutTests/crypto/subtle/clone-pbkdf2Key.html |
diff --git a/LayoutTests/crypto/subtle/clone-pbkdf2Key.html b/LayoutTests/crypto/subtle/clone-pbkdf2Key.html |
deleted file mode 100644 |
index a70c221e5ff9cb49f6a1bc73a1b84e457fc54c8d..0000000000000000000000000000000000000000 |
--- a/LayoutTests/crypto/subtle/clone-pbkdf2Key.html |
+++ /dev/null |
@@ -1,85 +0,0 @@ |
-<!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("Tests structured cloning of PBKDF2 keys"); |
- |
-jsTestIsAsync = true; |
- |
-// Tests the 27 permutations of keys generated by: |
-// kPossibleHashAlgorithms x kPossibleKeyUsages x kPossibleKeyData |
-// |
-// For practical reasons these tests are not exhaustive. |
- |
-var k1ByteData = "30" |
-var k8ByteData = "0011223344554677"; |
-var k11ByteData = "00112233445546778899aa"; |
- |
-var kPossibleHashAlgorithms = ['SHA-1', 'SHA-256', 'SHA-512']; |
-var kPossibleKeyUsages = [['deriveBits'], ['deriveKey'], ['deriveKey', 'deriveBits']]; |
-var kPossibleKeyData = [ |
- k1ByteData, |
- k8ByteData, |
- k11ByteData |
-]; |
- |
-function runTest(hashName, keyUsages, keyData) |
-{ |
- var importData = hexStringToUint8Array(keyData); |
- var importAlgorithm = { name: 'PBKDF2', hash: {name: hashName } }; |
- var extractable = false; |
- |
- var results = {}; |
- |
- return crypto.subtle.importKey('raw', importData, importAlgorithm, extractable, keyUsages).then(function(importedKey) { |
- results.importedKey = importedKey; |
- importedKey.extraProperty = 'hi'; |
- return cloneKey(importedKey); |
- }).then(function(result) { |
- results.clonedKey = result; |
- importedKey = results.importedKey; |
- clonedKey = results.clonedKey; |
- |
- shouldEvaluateAs("importedKey.extraProperty", "hi"); |
- shouldEvaluateAs("importedKey.type", "secret"); |
- shouldEvaluateAs("importedKey.extractable", extractable); |
- shouldEvaluateAs("importedKey.algorithm.name", "PBKDF2"); |
- shouldEvaluateAs("importedKey.usages.join(',')", keyUsages.join(",")); |
- |
- shouldNotBe("importedKey", "clonedKey"); |
- |
- shouldBeUndefined("clonedKey.extraProperty"); |
- shouldEvaluateAs("clonedKey.type", "secret"); |
- shouldEvaluateAs("clonedKey.extractable", extractable); |
- shouldEvaluateAs("clonedKey.algorithm.name", "PBKDF2"); |
- shouldEvaluateAs("clonedKey.usages.join(',')", keyUsages.join(",")); |
- |
- logSerializedKey(importedKey); |
- |
- debug(""); |
- }); |
-} |
- |
-var lastPromise = Promise.resolve(null); |
- |
-kPossibleHashAlgorithms.forEach(function(hashName) { |
- kPossibleKeyUsages.forEach(function(keyUsages) { |
- kPossibleKeyData.forEach(function(keyData) { |
- lastPromise = lastPromise.then(runTest.bind(null, hashName, keyUsages, keyData)); |
- }); |
- }); |
-}); |
- |
-lastPromise.then(finishJSTest, failAndFinishJSTest); |
- |
-</script> |
- |
-</body> |
-</html> |