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

Unified Diff: LayoutTests/crypto/aes-cbc-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
Index: LayoutTests/crypto/aes-cbc-import-jwk.html
diff --git a/LayoutTests/crypto/aes-cbc-import-jwk.html b/LayoutTests/crypto/aes-cbc-import-jwk.html
deleted file mode 100644
index 79334d75494800afd153ff2e3274fb384bb17923..0000000000000000000000000000000000000000
--- a/LayoutTests/crypto/aes-cbc-import-jwk.html
+++ /dev/null
@@ -1,51 +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 a JWK key for AES-CBC.");
-
-jsTestIsAsync = true;
-
-var extractable = true;
-
-var iv = hexStringToUint8Array("000102030405060708090a0b0c0d0e0f");
-var plaintext = hexStringToUint8Array("6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be6");
-var cipherText = ""
-
-var jwkKey = {
- "kty": "oct",
- "alg": "A256CBC",
- "use": "enc",
- "ext": true,
- "k": "YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3_Q"
-};
-
-debug("Importing a key...\n");
-crypto.subtle.importKey("jwk", jwkKey, {name: 'AES-CBC'}, false, ["encrypt"]).then(function(result) {
- key = result;
-
- shouldBe("key.type", "'secret'");
- shouldBe("key.extractable", "false");
- shouldBe("key.algorithm.name", "'AES-CBC'");
- shouldBe("key.algorithm.length", "256");
- shouldBe("key.usages", '["encrypt"]');
-
- debug("\nUsing the key to encrypt plaintext...");
- return crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
-}).then(function(result) {
- encryptionResult = result;
- shouldBe("bytesToHexString(new Uint8Array(encryptionResult))", "'f58c4c04d6e5f1ba779eabfb5f7bfbd69cfc4e967edb808d679f777bc6702c7d39f23369a9d9bacfa530e26304231461c9aaf02a6a54e9e242ccbf48c59daca6'");
- finishJSTest();
-}).then(finishJSTest, failAndFinishJSTest);
-
-</script>
-
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698