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

Unified Diff: LayoutTests/crypto/importKey-badParameters.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/import-jwk-expected.txt ('k') | LayoutTests/crypto/importKey-badParameters-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/crypto/importKey-badParameters.html
diff --git a/LayoutTests/crypto/importKey-badParameters.html b/LayoutTests/crypto/importKey-badParameters.html
deleted file mode 100644
index 1e51953877d6a350aef63e653706b0d862167974..0000000000000000000000000000000000000000
--- a/LayoutTests/crypto/importKey-badParameters.html
+++ /dev/null
@@ -1,70 +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 calling cypto.subtle.importKey with bad parameters");
-
-jsTestIsAsync = true;
-
-var aesCbc = {name: 'aes-cbc'};
-var aesKeyBytes = new Uint8Array(16);
-var extractable = true;
-
-// Undefined key usage.
-// FIXME: http://crbug.com/262383
-//shouldThrow("crypto.subtle.importKey('raw', aesKeyBytes, aesCbc, extractable, undefined)");
-
-Promise.resolve(null).then(function() {
- // Invalid data
- return crypto.subtle.importKey('raw', [], aesCbc, extractable, ['encrypt']);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- // 'null' treated as a Dictionary with default values - an empty dictionary
- return crypto.subtle.importKey('raw', null, aesCbc, extractable, ['encrypt']);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- // Invalid algorithm
- return crypto.subtle.importKey('raw', aesKeyBytes, null, extractable, ['encrypt']);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- // Invalid format.
- return crypto.subtle.importKey('invalid format', aesKeyBytes, aesCbc, extractable, ['encrypt']);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- // Invalid key usage (case sensitive).
- return crypto.subtle.importKey('raw', aesKeyBytes, aesCbc, extractable, ['ENCRYPT']);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- // If both the format and key usage are bogus, should complain about the
- // format first.
- return crypto.subtle.importKey('invalid format', aesKeyBytes, aesCbc, extractable, ['ENCRYPT']);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- // Missing hash parameter for HMAC.
- return crypto.subtle.importKey('raw', new Uint8Array(20), {name: 'hmac'}, extractable, ['sign']);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-
- // SHA-1 doesn't support the importKey operation.
- return crypto.subtle.importKey('raw', new Uint8Array(20), {name: 'sha-1'}, extractable, ['sign']);
-}).then(failAndFinishJSTest, function(result) {
- logError(result);
-}).then(finishJSTest, failAndFinishJSTest);
-
-</script>
-
-</body>
-</html>
« no previous file with comments | « LayoutTests/crypto/import-jwk-expected.txt ('k') | LayoutTests/crypto/importKey-badParameters-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698