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

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: 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
Index: LayoutTests/crypto/sign-verify.html
diff --git a/LayoutTests/crypto/sign-verify.html b/LayoutTests/crypto/sign-verify.html
index f9a73fd651b1815a07c5dd424a535e978c5f8d13..d7d38b5b0619208bb9bd535b7cfb940ed6243fa1 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");
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)
{

Powered by Google App Engine
This is Rietveld 408576698