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

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

Issue 222003006: [webcrypto] Don't throw any extra WebIDL exceptions from WebCrypto methods. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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/sign-verify-badParameters.html
diff --git a/LayoutTests/crypto/sign-verify-badParameters.html b/LayoutTests/crypto/sign-verify-badParameters.html
index 707c7eb0d3bdb2c22bf5b56c06dc1e048fc2db28..252de91485635a33031dc755346eea4ded1597d1 100644
--- a/LayoutTests/crypto/sign-verify-badParameters.html
+++ b/LayoutTests/crypto/sign-verify-badParameters.html
@@ -30,9 +30,22 @@ importHmacKey().then(function(result) {
key = result;
// Pass invalid signature parameters to verify()
- shouldThrow("crypto.subtle.verify(hmac, key, null, data)");
- shouldThrow("crypto.subtle.verify(hmac, key, 'a', data)");
- shouldThrow("crypto.subtle.verify(hmac, key, [], data)");
+ return crypto.subtle.verify(hmac, key, null, data);
+}).then(failAndFinishJSTest, function(result) {
+ error = result;
+ shouldBeNull("error");
+
+ // Pass invalid signature parameters to verify()
+ return crypto.subtle.verify(hmac, key, 'a', data);
+}).then(failAndFinishJSTest, function(result) {
+ error = result;
+ shouldBeNull("error");
+
+ // Pass invalid signature parameters to verify()
+ return crypto.subtle.verify(hmac, key, [], data);
+}).then(failAndFinishJSTest, function(result) {
+ error = result;
+ shouldBeNull("error");
// Operation does not support signing.
return crypto.subtle.sign({name: 'sha-1'}, key, data);
« no previous file with comments | « LayoutTests/crypto/importKey-badParameters-expected.txt ('k') | LayoutTests/crypto/sign-verify-badParameters-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698