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

Unified Diff: LayoutTests/crypto/jwk-export-use-values.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/jwk-export-use-values.html
diff --git a/LayoutTests/crypto/jwk-export-use-values.html b/LayoutTests/crypto/jwk-export-use-values.html
deleted file mode 100644
index c5e4354c556d7ccd10687dc2ccb5efc08f9ba584..0000000000000000000000000000000000000000
--- a/LayoutTests/crypto/jwk-export-use-values.html
+++ /dev/null
@@ -1,63 +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 exporting keys with various usages to JWK.");
-
-jsTestIsAsync = true;
-
-var extractable = true;
-
-var aesKeyAsArrayBuffer = Base64URL.parse("jnOw99oOZFLIEPMrgJB55Q");
-var hmacKeyAsArrayBuffer = Base64URL.parse("ahjkn-_387fgnsibf23qsvahjkn-_387fgnsibf23qs");
-
-function testWithAESCBC(usages, expectedKeyOps)
-{
- return crypto.subtle.importKey("raw", aesKeyAsArrayBuffer, {name: "AES-CBC"}, extractable, usages).then(function(result) {
- return crypto.subtle.exportKey("jwk", result);
- }).then(function(result) {
- jwk = result;
- debug(usages + ":");
- shouldBe("jwk.use", "undefined");
- shouldBe("jwk.key_ops", JSON.stringify(expectedKeyOps));
- debug("");
- });
-}
-
-function testWithHMAC(usages, expectedKeyOps)
-{
- return crypto.subtle.importKey("raw", hmacKeyAsArrayBuffer, {name: 'hmac', hash: {name: 'sha-256'}}, extractable, usages).then(function(result) {
- return crypto.subtle.exportKey("jwk", result);
- }).then(function(result) {
- jwk = result;
- debug(usages + ":");
- shouldBe("jwk.use", "undefined");
- shouldBe("jwk.key_ops", JSON.stringify(expectedKeyOps));
- debug("");
- });
-}
-
-Promise.all([
- testWithAESCBC(["encrypt"], ["encrypt"]),
- testWithAESCBC(["decrypt"], ["decrypt"]),
- testWithAESCBC(["encrypt", "decrypt"], ["encrypt", "decrypt"]),
- testWithAESCBC(["wrapKey"], ["wrapKey"]),
- testWithAESCBC(["unwrapKey"], ["unwrapKey"]),
- testWithAESCBC(["wrapKey", "unwrapKey"], ["wrapKey", "unwrapKey"]),
- testWithAESCBC(["encrypt", "decrypt", "wrapKey"], ["encrypt", "decrypt", "wrapKey"]),
- testWithAESCBC(["encrypt", "decrypt", "wrapKey", "unwrapKey"], ["encrypt", "decrypt", "wrapKey", "unwrapKey"]),
- testWithHMAC(["sign"], ["sign"]),
- testWithHMAC(["verify"], ["verify"]),
- testWithHMAC(["sign", "verify"], ["sign", "verify"]),
-]).then(finishJSTest, failAndFinishJSTest);
-</script>
-
-</body>
-</html>
« no previous file with comments | « LayoutTests/crypto/importKey-normalize-usages-expected.txt ('k') | LayoutTests/crypto/jwk-export-use-values-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698