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

Unified Diff: LayoutTests/crypto/subtle/ecdh-import-jwk.html

Issue 957713004: [WebCrypto] Split LayoutTests/crypto/subtle into per-algorithm directories (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to latest master Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/crypto/subtle/ecdh-import-jwk.html
diff --git a/LayoutTests/crypto/subtle/ecdh-import-jwk.html b/LayoutTests/crypto/subtle/ecdh-import-jwk.html
deleted file mode 100644
index ac54f5767fb5d83b320f49b763e8eceb245d2436..0000000000000000000000000000000000000000
--- a/LayoutTests/crypto/subtle/ecdh-import-jwk.html
+++ /dev/null
@@ -1,54 +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 importing an EC public and private key for ECDH.");
-
-jsTestIsAsync = true;
-
-var extractable = true;
-
-var publicKeyJSON = {
- "kty": "EC",
- "crv": "P-256",
- "x": "nLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKSo1vc",
- "y": "LVEjOheIkgqG7gihlix576MX-3h54pfa0hRtuZX6HHg"
-};
-
-var privateKeyJSON = {
- "kty": "EC",
- "crv": "P-384",
- "d": "pJLOj6kAhMIn4aMveXTTnp_2en6HBew0GbNftgdYK-vUYeCxUgrHbsLdTptj665x",
- "x": "5V_ubEnY1SP1znv5wEJc5P9lBwi33lz7CVkBUjl5p_BCYC2zCFRzU2mBO1w_Xvho",
- "y": "KPWcxdxQmJKpiNOKjiUZ3j0MT9D72wmT448YUGwXYGxeJCSSRvHOlJg6U2HFvpg-"
-};
-
-debug("Importing a public key...");
-crypto.subtle.importKey("jwk", publicKeyJSON, {name: "ECDH", namedCurve: "P-256"}, extractable, []).then(function(result) {
- publicKey = result;
- shouldBe("publicKey.toString()", "'[object CryptoKey]'");
- shouldBe("publicKey.type", "'public'");
- shouldBe("publicKey.usages", "[]");
- shouldBe("publicKey.algorithm.name", "'ECDH'");
- shouldBe("publicKey.algorithm.namedCurve", "'P-256'");
- debug("\nImporting a private key...");
- return crypto.subtle.importKey("jwk", privateKeyJSON, {name: "ECDH", namedCurve: "P-384"}, extractable, ["deriveBits"]);
-}).then(function(result) {
- privateKey = result;
- shouldBe("privateKey.toString()", "'[object CryptoKey]'");
- shouldBe("privateKey.type", "'private'");
- shouldBe("privateKey.usages", "['deriveBits']");
- shouldBe("privateKey.algorithm.name", "'ECDH'");
- shouldBe("privateKey.algorithm.namedCurve", "'P-384'");
-}).then(finishJSTest, failAndFinishJSTest);
-</script>
-
-</body>
-</html>
« no previous file with comments | « LayoutTests/crypto/subtle/ecdh-generate-key-expected.txt ('k') | LayoutTests/crypto/subtle/ecdh-import-jwk-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698