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

Unified Diff: LayoutTests/crypto/digest-failures.html

Issue 243853004: [webcrypto] Reject failed operations with a DOMException rather than null. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compile warning 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/digest-failures.html
diff --git a/LayoutTests/crypto/digest-failures.html b/LayoutTests/crypto/digest-failures.html
index 954e70010212d1f83f06a91f385316a358cc94a9..a9b50a09b155979ed2a33ff005c1ec40ad749099 100644
--- a/LayoutTests/crypto/digest-failures.html
+++ b/LayoutTests/crypto/digest-failures.html
@@ -17,39 +17,33 @@ Promise.resolve(null).then(function(result) {
// Called with too few parameters.
return crypto.subtle.digest({name: 'sha-1'});
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeTypeError("error");
+ logError(result);
// "null" is not a valid data argument.
return crypto.subtle.digest({name: 'sha-1'}, null);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
// 10 is not a valid data argument.
return crypto.subtle.digest({name: 'sha-1'}, 10);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
// null is not a valid algorithm argument.
data = new Uint8Array([0]);
return crypto.subtle.digest(null, data);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
// "sha" is not a recognized algorithm name
return crypto.subtle.digest({name: 'sha'}, data);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
// Algorithm lacks a name.
return crypto.subtle.digest({}, data);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
}).then(finishJSTest, failAndFinishJSTest);

Powered by Google App Engine
This is Rietveld 408576698