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

Unified Diff: LayoutTests/crypto/sign-verify.html

Issue 23164012: WebCrypto: Remove support for multi-part operations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Sync to tot Created 7 years, 4 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/normalize-algorithm-expected.txt ('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 f9a73fd651b1815a07c5dd424a535e978c5f8d13..2b2ae0c5fc38585586617f14d5233bc070e3cd8e 100644
--- a/LayoutTests/crypto/sign-verify.html
+++ b/LayoutTests/crypto/sign-verify.html
@@ -17,17 +17,17 @@ importHmacSha1Key().then(function(key) {
hmacSha1Key = key;
hmacSha1 = {name: 'hmac', hash: {name: 'Sha-1'}};
- // Pass invalid signature parameters to verify()
- shouldThrow("crypto.subtle.verify(hmacSha1, hmacSha1Key, null)");
- shouldThrow("crypto.subtle.verify(hmacSha1, hmacSha1Key, 'a')");
- shouldThrow("crypto.subtle.verify(hmacSha1, hmacSha1Key, [])");
-
- var data = asciiToArrayBuffer("hello");
+ data = asciiToArrayBuffer("hello");
var expectedSignature = asciiToArrayBuffer("signed HMAC:hello");
- var signPromise = crypto.subtle.sign(hmacSha1, hmacSha1Key).process(data).finish();
- var verifyPromise = crypto.subtle.verify(hmacSha1, hmacSha1Key, expectedSignature).process(data).finish();
- var badVerifyPromise = crypto.subtle.verify(hmacSha1, hmacSha1Key, asciiToArrayBuffer("badsignature")).process(data).finish();
+ // Pass invalid signature parameters to verify()
+ shouldThrow("crypto.subtle.verify(hmacSha1, hmacSha1Key, null, data)");
+ shouldThrow("crypto.subtle.verify(hmacSha1, hmacSha1Key, 'a', data)");
+ shouldThrow("crypto.subtle.verify(hmacSha1, hmacSha1Key, [], data)");
+
+ var signPromise = crypto.subtle.sign(hmacSha1, hmacSha1Key, data);
+ var verifyPromise = crypto.subtle.verify(hmacSha1, hmacSha1Key, expectedSignature, data);
+ var badVerifyPromise = crypto.subtle.verify(hmacSha1, hmacSha1Key, asciiToArrayBuffer("badsignature"), data);
Promise.every(signPromise, verifyPromise, badVerifyPromise).then(function(results)
{
« no previous file with comments | « LayoutTests/crypto/normalize-algorithm-expected.txt ('k') | LayoutTests/crypto/sign-verify-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698