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

Unified Diff: LayoutTests/crypto/sign-verify.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/resources/common.js ('k') | LayoutTests/crypto/sign-verify-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/crypto/sign-verify.html
diff --git a/LayoutTests/crypto/sign-verify.html b/LayoutTests/crypto/sign-verify.html
index 342a2ba83f573ea582c4ec6b7cf4301da83ada3f..79b791d31cb40126d57b798109650e60711cb64a 100644
--- a/LayoutTests/crypto/sign-verify.html
+++ b/LayoutTests/crypto/sign-verify.html
@@ -140,17 +140,17 @@ allTests.push(importTestKeys().then(function(importedKeys) {
shouldThrow("crypto.subtle.sign({name: 'RSAES-PKCS1-v1_5'}, keys.hmacSha1, data)");
// Key's algorithm must match.
- shouldThrow("crypto.subtle.sign({name: 'hmac', hash: {name: 'sha-256'}}, keys.hmacSha1, data)");
+ shouldRejectPromiseWithNull("crypto.subtle.sign({name: 'hmac', hash: {name: 'sha-256'}}, keys.hmacSha1, data)");
// ---------------------------------------------------
// HMAC normalization failures (HmacParams)
// ---------------------------------------------------
- shouldThrow("crypto.subtle.sign({name: 'hmac'}, keys.hmacSha1, data)");
- shouldThrow("crypto.subtle.sign({name: 'hmac', hash: 3}, keys.hmacSha1, data)");
- shouldThrow("crypto.subtle.sign({name: 'hmac', hash: null}, keys.hmacSha1, data)");
- shouldThrow("crypto.subtle.sign({name: 'hmac', hash: {}}, keys.hmacSha1, data)");
- shouldThrow("crypto.subtle.sign({name: 'hmac', hash: {name: 'foo'}}, keys.hmacSha1, data)");
- shouldThrow("crypto.subtle.sign({name: 'hmac', hash: {name: 'AES-CBC'}}, keys.hmacSha1, data)");
+ shouldRejectPromiseWithNull("crypto.subtle.sign({name: 'hmac'}, keys.hmacSha1, data)");
+ shouldRejectPromiseWithNull("crypto.subtle.sign({name: 'hmac', hash: 3}, keys.hmacSha1, data)");
+ shouldRejectPromiseWithNull("crypto.subtle.sign({name: 'hmac', hash: null}, keys.hmacSha1, data)");
+ shouldRejectPromiseWithNull("crypto.subtle.sign({name: 'hmac', hash: {}}, keys.hmacSha1, data)");
+ shouldRejectPromiseWithNull("crypto.subtle.sign({name: 'hmac', hash: {name: 'foo'}}, keys.hmacSha1, data)");
+ shouldRejectPromiseWithNull("crypto.subtle.sign({name: 'hmac', hash: {name: 'AES-CBC'}}, keys.hmacSha1, data)");
}));
// -------------------------------------------------
« no previous file with comments | « LayoutTests/crypto/resources/common.js ('k') | LayoutTests/crypto/sign-verify-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698