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

Unified Diff: LayoutTests/crypto/wrap-unwrap.html

Issue 141413003: [webcrypto] Match the error handling defined by the spec. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 11 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
« no previous file with comments | « LayoutTests/crypto/sign-verify-expected.txt ('k') | LayoutTests/crypto/wrap-unwrap-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/crypto/wrap-unwrap.html
diff --git a/LayoutTests/crypto/wrap-unwrap.html b/LayoutTests/crypto/wrap-unwrap.html
index 39f77982345e98b9ee25ad367d765d7461dcc3f5..11901f972279fc3fefad01a54b2815dc8298477b 100644
--- a/LayoutTests/crypto/wrap-unwrap.html
+++ b/LayoutTests/crypto/wrap-unwrap.html
@@ -41,10 +41,10 @@ importTestKeys().then(function(result) {
shouldThrow("crypto.subtle.wrapKey('raw', key, wrappingKey, undefined)");
// Key is not extractable.
- shouldThrow("crypto.subtle.wrapKey('raw', keys.aesCbcJustDecrypt, wrappingKey, wrapAlgorithm)");
+ shouldRejectPromiseWithNull("crypto.subtle.wrapKey('raw', keys.aesCbcJustDecrypt, wrappingKey, wrapAlgorithm)");
// wrappingKey's usage does not include wrapKey.
- shouldThrow("crypto.subtle.wrapKey('raw', key, keys.aesCbcJustDecrypt, wrapAlgorithm)");
+ shouldRejectPromiseWithNull("crypto.subtle.wrapKey('raw', key, keys.aesCbcJustDecrypt, wrapAlgorithm)");
// SHA-1 isn't a valid wrapKey algorithm.
shouldThrow("crypto.subtle.wrapKey('raw', key, wrappingKey, {name: 'SHA-1'})");
@@ -52,7 +52,7 @@ importTestKeys().then(function(result) {
// Wrap algorithm doesn't match the wrapping key's algorithm (AES-CBC key
// with AES-CTR wrap algorithm)
aesCtrAlgorithm = {name: 'AES-CTR', counter: new Uint8Array(16), length: 0};
- shouldThrow("crypto.subtle.wrapKey('raw', key, wrappingKey, aesCtrAlgorithm)");
+ shouldRejectPromiseWithNull("crypto.subtle.wrapKey('raw', key, wrappingKey, aesCtrAlgorithm)");
// --------------------------------
// unwrapKey invalid parameters
@@ -75,7 +75,7 @@ importTestKeys().then(function(result) {
shouldThrow("crypto.subtle.unwrapKey('raw', wrappedKey, 'hi', unwrapAlgorithm, unwrappedKeyAlgorithm, extractable, keyUsages)");
// unwrappingKey does not include unwrapKey usage.
- shouldThrow("crypto.subtle.unwrapKey('raw', wrappedKey, keys.aesCbcJustDecrypt, unwrapAlgorithm, unwrappedKeyAlgorithm, extractable, keyUsages)");
+ shouldRejectPromiseWithNull("crypto.subtle.unwrapKey('raw', wrappedKey, keys.aesCbcJustDecrypt, unwrapAlgorithm, unwrappedKeyAlgorithm, extractable, keyUsages)");
// Invalid keyUsages (also, unwrappedKeyAlgorithm is set to null).
shouldThrow("crypto.subtle.unwrapKey('raw', wrappedKey, 'hi', unwrapAlgorithm, null, extractable, 9)");
@@ -90,7 +90,7 @@ importTestKeys().then(function(result) {
shouldThrow("crypto.subtle.unwrapKey('raw', wrappedKey, unwrappingKey, {name: 'SHA-1'}, unwrappedKeyAlgorithm, extractable, keyUsages)");
// Mismatch between the unwrappingKey's algorithm and unwrapAlgorithm.
- shouldThrow("crypto.subtle.unwrapKey('raw', wrappedKey, unwrappingKey, aesCtrAlgorithm, unwrappedKeyAlgorithm, extractable, keyUsages)");
+ shouldRejectPromiseWithNull("crypto.subtle.unwrapKey('raw', wrappedKey, unwrappingKey, aesCtrAlgorithm, unwrappedKeyAlgorithm, extractable, keyUsages)");
}).then(finishJSTest, failAndFinishJSTest);
« no previous file with comments | « LayoutTests/crypto/sign-verify-expected.txt ('k') | LayoutTests/crypto/wrap-unwrap-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698