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

Unified Diff: LayoutTests/crypto/ecdsa-sign-verify.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/ecdsa-import-jwk-expected.txt ('k') | LayoutTests/crypto/ecdsa-sign-verify-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/crypto/ecdsa-sign-verify.html
diff --git a/LayoutTests/crypto/ecdsa-sign-verify.html b/LayoutTests/crypto/ecdsa-sign-verify.html
deleted file mode 100644
index 7a6f6959e49854ef7e74470a8c4829eb29529cc4..0000000000000000000000000000000000000000
--- a/LayoutTests/crypto/ecdsa-sign-verify.html
+++ /dev/null
@@ -1,61 +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 key for ECDSA.");
-
-jsTestIsAsync = true;
-
-var extractable = true;
-
-var publicKeyJSON = {
- "kty": "EC",
- "crv": "P-256",
- "x": "fBEMZtz9qAf25p5F3bPHT2mhSE0gPo3Frajpqd18s8c",
- "y": "DfRImG5RveXRV2-ZkB-cLGqAakf9kHZDpyuDVZfvyMY"
-};
-
-var privateKeyJSON = {
- "kty": "EC",
- "crv": "P-256",
- "d": "H-M5UMX0YRJK6ZLCvf3xxzsWFfVxvVZ-YNGaofSM30I",
- "x": "fBEMZtz9qAf25p5F3bPHT2mhSE0gPo3Frajpqd18s8c",
- "y": "DfRImG5RveXRV2-ZkB-cLGqAakf9kHZDpyuDVZfvyMY"
-};
-
-var data = asciiToUint8Array("Hello, world!");
-
-debug("Importing a public key...");
-crypto.subtle.importKey("jwk", publicKeyJSON, { name: "ECDSA", namedCurve: "P-256" }, extractable, ["verify"]).then(function(result) {
- publicKey = result;
- debug("\nImporting a private key...");
- return crypto.subtle.importKey("jwk", privateKeyJSON, { name: "ECDSA", namedCurve: "P-256" }, extractable, ["sign"]);
-}).then(function(result) {
- privateKey = result;
- debug("\nSigning some text...");
- return crypto.subtle.sign({ name: "ECDSA", hash: { name: "SHA-1" } }, privateKey, data);
-}).then(function(result) {
- signature = result;
-
- debug("\nVerifying the signature...");
- return crypto.subtle.verify({ name: "ECDSA", hash: { name: "SHA-1" } }, publicKey, signature, data);
-}).then(function(result) {
- verificationResult = result;
- shouldBe("verificationResult", "true");
- debug("\nVerifying a bad signature...");
- return crypto.subtle.verify({ name: "ECDSA", hash: { name: "SHA-1" } }, publicKey, new Uint8Array(256), data);
-}).then(function(result) {
- verificationResult = result;
- shouldBe("verificationResult", "false");
-}).then(finishJSTest, failAndFinishJSTest);
-</script>
-
-</body>
-</html>
« no previous file with comments | « LayoutTests/crypto/ecdsa-import-jwk-expected.txt ('k') | LayoutTests/crypto/ecdsa-sign-verify-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698