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

Unified Diff: LayoutTests/crypto/digest.html

Issue 141413003: [webcrypto] Match the error handling defined by the spec. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 11 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 | « no previous file | LayoutTests/crypto/digest-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/crypto/digest.html
diff --git a/LayoutTests/crypto/digest.html b/LayoutTests/crypto/digest.html
index cb5255cb0cf01d37f25b36b67a60290127bedf7f..affc8c87f0cd9518bebca26fb74a0393b84ed9fa 100644
--- a/LayoutTests/crypto/digest.html
+++ b/LayoutTests/crypto/digest.html
@@ -98,11 +98,9 @@ kDigestTestVectors = [
},
];
-var allTests = [];
-
// Run each test.
for (var i = 0; i < kDigestTestVectors.length; ++i) {
- allTests.push(runTestCase(kDigestTestVectors[i]));
+ addTask(runTestCase(kDigestTestVectors[i]));
}
function runTestCase(testCase)
@@ -113,9 +111,7 @@ function runTestCase(testCase)
});
}
-Promise.all(allTests).then(finishJSTest, failAndFinishJSTest);
-
-// Pass invalid data to digeset()
+// Pass invalid data to digest()
shouldThrow("crypto.subtle.digest({name: 'sha-1'})");
shouldThrow("crypto.subtle.digest({name: 'sha-1'}, null)");
shouldThrow("crypto.subtle.digest({name: 'sha-1'}, 10)");
@@ -126,6 +122,8 @@ shouldThrow("crypto.subtle.digest({name: 'sha'}, data)");
shouldThrow("crypto.subtle.digest(null, data)");
shouldThrow("crypto.subtle.digest({}, data)");
+completeTestWhenAllTasksDone();
+
</script>
</body>
« no previous file with comments | « no previous file | LayoutTests/crypto/digest-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698