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

Unified Diff: LayoutTests/crypto/hmac-generateKey-parseAlgorithm-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/hmac-generateKey-parseAlgorithm-failures.html
diff --git a/LayoutTests/crypto/hmac-generateKey-parseAlgorithm-failures.html b/LayoutTests/crypto/hmac-generateKey-parseAlgorithm-failures.html
index fb5dc6b9b4f7d5736768580e907820259277160c..135040c86d8a9413dc3fff3e738ae97fefdf7300 100644
--- a/LayoutTests/crypto/hmac-generateKey-parseAlgorithm-failures.html
+++ b/LayoutTests/crypto/hmac-generateKey-parseAlgorithm-failures.html
@@ -18,48 +18,39 @@ keyUsages = ['sign', 'verify'];
Promise.resolve(null).then(function() {
return crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: -3}, extractable , keyUsages);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
return crypto.subtle.generateKey({name: 'hmac', hash: {name: ''}, length: 48}, extractable , keyUsages);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
return crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: 5000000000}, extractable , keyUsages);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
return crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: NaN}, extractable , keyUsages);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
return crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: Infinity}, extractable , keyUsages);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
return crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: -Infinity}, extractable , keyUsages);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
return crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: crypto}, extractable , keyUsages);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
return crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: undefined}, extractable , keyUsages);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
return crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: true}, extractable , keyUsages);
}).then(failAndFinishJSTest, function(result) {
- error = result;
- shouldBeNull("error");
+ logError(result);
}).then(finishJSTest, failAndFinishJSTest);
</script>

Powered by Google App Engine
This is Rietveld 408576698