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

Unified Diff: LayoutTests/crypto/ecdh-generate-key.html

Issue 754563003: Add LayoutTests for WebCrypto's ECDH algorithm. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase onto master Created 6 years, 1 month 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/ecdh-generate-key.html
diff --git a/LayoutTests/crypto/ecdsa-generate-key.html b/LayoutTests/crypto/ecdh-generate-key.html
similarity index 71%
copy from LayoutTests/crypto/ecdsa-generate-key.html
copy to LayoutTests/crypto/ecdh-generate-key.html
index 8bf2ff3db5d9514c705ee97553be32a4b8d04069..82de0a7f41d8bd470a2ba078942952c5744ab971 100644
--- a/LayoutTests/crypto/ecdsa-generate-key.html
+++ b/LayoutTests/crypto/ecdh-generate-key.html
@@ -9,28 +9,28 @@
<div id="console"></div>
<script>
-description("Test generating an EC key pair for ECDSA.");
+description("Test generating an EC key pair for ECDH.");
jsTestIsAsync = true;
var algorithmKeyGen = {
- name: "ecdsa",
+ name: "ecdh",
namedCurve: "P-256",
};
var extractable = true;
debug("Generating a key pair...");
-crypto.subtle.generateKey(algorithmKeyGen, extractable, ["sign", "verify"]).then(function(result) {
+crypto.subtle.generateKey(algorithmKeyGen, extractable, ["deriveBits"]).then(function(result) {
keyPair = result;
shouldBe("keyPair.toString()", "'[object Object]'");
shouldBe("keyPair.publicKey.type", "'public'");
- shouldBe("keyPair.publicKey.algorithm.name", "'ECDSA'");
+ shouldBe("keyPair.publicKey.algorithm.name", "'ECDH'");
shouldBe("keyPair.publicKey.algorithm.namedCurve", "'P-256'");
- shouldBe("keyPair.publicKey.usages", '["verify"]');
+ shouldBe("keyPair.publicKey.usages", '[]');
shouldBe("keyPair.privateKey.type", "'private'");
- shouldBe("keyPair.privateKey.algorithm.name", "'ECDSA'");
+ shouldBe("keyPair.privateKey.algorithm.name", "'ECDH'");
shouldBe("keyPair.privateKey.algorithm.namedCurve", "'P-256'");
- shouldBe("keyPair.privateKey.usages", '["sign"]');
+ shouldBe("keyPair.privateKey.usages", '["deriveBits"]');
debug("\nTesting that custom attributes on keys survive garbage collection...");
keyPair.publicKey.foo = "bar";
« no previous file with comments | « LayoutTests/crypto/ecdh-deriveBits-failures-expected.txt ('k') | LayoutTests/crypto/ecdh-generate-key-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698