| Index: LayoutTests/crypto/hmac-generate-key.html
|
| diff --git a/LayoutTests/crypto/hmac-generate-key.html b/LayoutTests/crypto/hmac-generate-key.html
|
| deleted file mode 100644
|
| index 0da1f7292608d793399461ee688be76f4bb127af..0000000000000000000000000000000000000000
|
| --- a/LayoutTests/crypto/hmac-generate-key.html
|
| +++ /dev/null
|
| @@ -1,58 +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("Test generating a HMAC key.");
|
| -
|
| -jsTestIsAsync = true;
|
| -
|
| -var extractable = true;
|
| -
|
| -
|
| -debug("\nGenerating a key with default length...");
|
| -
|
| -Promise.resolve(null).then(function(result) {
|
| - return crypto.subtle.generateKey("hmac", extractable, ["sign", "verify"]);
|
| -}).then(failAndFinishJSTest, function(result) {
|
| - logError(result);
|
| - return crypto.subtle.generateKey({name: "hmac"}, extractable, ["sign", "verify"]);
|
| -}).then(failAndFinishJSTest, function(result) {
|
| - logError(result);
|
| - return crypto.subtle.generateKey({name: "hmac", length: undefined, hash: {name: "sha-1"}}, extractable, ["sign", "verify"]);
|
| -}).then(failAndFinishJSTest, function(result) {
|
| - logError(result);
|
| - return crypto.subtle.generateKey({name: "hmac", length: {}, hash: {name: "sha-1"}}, extractable, ["sign", "verify"]);
|
| -}).then(failAndFinishJSTest, function(result) {
|
| - logError(result);
|
| - return crypto.subtle.generateKey({name: "hmac", hash: {name: "sha-1"}}, extractable, ["sign", "verify"]);
|
| -}).then(function(result) {
|
| - key = result;
|
| -
|
| - shouldBe("key.type", "'secret'");
|
| - shouldBe("key.extractable", "true");
|
| - shouldBe("key.algorithm.name", "'HMAC'");
|
| - shouldBe("key.algorithm.length", "512");
|
| - shouldBe("key.usages", '["sign", "verify"]');
|
| -
|
| - debug("\nGenerating a key with custom length...");
|
| - return crypto.subtle.generateKey({name: "hmac", hash: {name: "sha-1"}, length: 40}, extractable, ["sign"]);
|
| -}).then(function(result) {
|
| - key = result;
|
| -
|
| - shouldBe("key.type", "'secret'");
|
| - shouldBe("key.extractable", "true");
|
| - shouldBe("key.algorithm.name", "'HMAC'");
|
| - shouldBe("key.algorithm.length", "40");
|
| - shouldBe("key.usages", '["sign"]');
|
| -}).then(finishJSTest, failAndFinishJSTest);
|
| -</script>
|
| -
|
| -</body>
|
| -</html>
|
|
|