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

Unified Diff: LayoutTests/crypto/subtle/ecdh-deriveBits-failures.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-deriveBits-failures.html
diff --git a/LayoutTests/crypto/subtle/ecdh-deriveBits-failures.html b/LayoutTests/crypto/subtle/ecdh-deriveBits-failures.html
deleted file mode 100644
index 1ade6addb0c6e7db8831b4a96a22e26c726ec9b2..0000000000000000000000000000000000000000
--- a/LayoutTests/crypto/subtle/ecdh-deriveBits-failures.html
+++ /dev/null
@@ -1,95 +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("Tests bad inputs to ECDH's deriveBits()");
-
-jsTestIsAsync = true;
-
-var keyPairs = {
- ecdh: {},
- ecdsa: {}
-};
-
-// Generate some EC keys for ECDSA and ECDH.
-function createTestKeys() {
- return crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, true, ["deriveBits"]).then(function(result) {
- keyPairs.ecdh.p256_1 = result;
-
- return crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, true, ["deriveBits"]);
- }).then(function(result) {
- keyPairs.ecdh.p256_2 = result;
-
- return crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-384"}, true, ["deriveBits"]);
- }).then(function(result) {
- keyPairs.ecdh.p384_1 = result;
-
- return crypto.subtle.generateKey({name: "ecdsa", namedCurve: "P-256"}, true, ["sign"]);
- }).then(function(result) {
- keyPairs.ecdsa.p256_1 = result;
- });
-}
-
-createTestKeys().then(function(result) {
- debug("\nderiveBits() without algorithm name or public key...");
- return crypto.subtle.deriveBits({}, keyPairs.ecdh.p256_1.privateKey, 256);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- debug("\nderiveBits() without public key...");
- return crypto.subtle.deriveBits({name: 'ecdh'}, keyPairs.ecdh.p256_1.privateKey, 256);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- debug("\nderiveBits() with algorithm that is null...");
- return crypto.subtle.deriveBits(null, keyPairs.ecdh.p256_1.privateKey, 256);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- debug("\nderiveBits() with algorithm that is -1...");
- return crypto.subtle.deriveBits(-1, keyPairs.ecdh.p256_1.privateKey, 256);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- debug("\nderiveBits() with public key that is null...");
- return crypto.subtle.deriveBits({name: 'ecdh', public: null}, keyPairs.ecdh.p256_1.privateKey, 256);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- debug("\nderiveBits() with public key that is -1...");
- return crypto.subtle.deriveBits({name: 'ecdh', public: -1}, keyPairs.ecdh.p256_1.privateKey, 256);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- debug("\nderiveBits() with public key that is a string...");
- return crypto.subtle.deriveBits({name: 'ecdh', public: "foo"}, keyPairs.ecdh.p256_1.privateKey, 256);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- debug("\nderiveBits() with wrong curve public key...");
- return crypto.subtle.deriveBits({name: 'ecdh', public: keyPairs.ecdh.p384_1.publicKey}, keyPairs.ecdh.p256_1.privateKey, 256);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- debug("\nderiveBits() with a private key as the 'public' parameter");
- return crypto.subtle.deriveBits({name: 'ecdh', public: keyPairs.ecdh.p256_2.privateKey}, keyPairs.ecdh.p256_1.privateKey, 256);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- debug("\nderiveBits() with public key that is for ECDSA...");
- return crypto.subtle.deriveBits({name: 'ecdh', public: keyPairs.ecdsa.p256_1.publicKey}, keyPairs.ecdh.p256_1.privateKey, {test: 3});
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-}).then(finishJSTest, failAndFinishJSTest);
-
-</script>
-
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698