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

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

Issue 806913006: [WebCrypto] Move LayoutTests from crypto to crypto/subtle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update path for deserialize legacy tests Created 6 years 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
« no previous file with comments | « LayoutTests/crypto/ecdh-generate-key-expected.txt ('k') | LayoutTests/crypto/ecdh-import-jwk-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/crypto/ecdh-import-jwk.html
diff --git a/LayoutTests/crypto/ecdh-import-jwk.html b/LayoutTests/crypto/ecdh-import-jwk.html
deleted file mode 100644
index 70af32665c9c47bac6a4199a1fb081d756c167a9..0000000000000000000000000000000000000000
--- a/LayoutTests/crypto/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/ecdh-generate-key-expected.txt ('k') | LayoutTests/crypto/ecdh-import-jwk-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698