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

Unified Diff: LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures.html

Issue 240063002: [webcrypto] Update layout tests to match idl generator changes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/aes-cbc-generateKey-parseAlgorithm-failures.html
diff --git a/LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures.html b/LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures.html
index bbc16d343fc97329d3bf0d6aec9c014a5ebd899e..8e1601bc3ff92d95f3987c0178df8a7288a333a7 100644
--- a/LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures.html
+++ b/LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures.html
@@ -15,11 +15,19 @@ jsTestIsAsync = true;
extractable = true;
keyUsages = ['encrypt', 'decrypt'];
-// Invalid keyUsages
-shouldThrow("crypto.subtle.generateKey({ name: 'aes-cbc', length: 1024 }, extractable, -1)");
-shouldThrow("crypto.subtle.generateKey({ name: 'aes-cbc', length: 1024 }, extractable, null)");
-
Promise.resolve(null).then(function() {
+ // Invalid keyUsages
+ return crypto.subtle.generateKey({ name: 'aes-cbc', length: 1024 }, extractable, -1);
+}).then(failAndFinishJSTest, function(result) {
+ error = result
+ shouldBeTypeError("error");
+
+ // Invalid keyUsages
+ return crypto.subtle.generateKey({ name: 'aes-cbc', length: 1024 }, extractable, null);
+}).then(failAndFinishJSTest, function(result) {
+ error = result
+ shouldBeTypeError("error");
+
// Bad key usage "boo".
return crypto.subtle.generateKey({ name: 'aes-cbc', length: 1024 }, extractable, ['boo']);
}).then(failAndFinishJSTest, function(result) {
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698