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

Side by Side Diff: LayoutTests/crypto/digest-failures.html

Issue 806913006: [WebCrypto] Move LayoutTests from crypto to crypto/subtle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update path for deserialize legacy tests Created 6 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 <script src="resources/common.js"></script>
6 </head>
7 <body>
8 <p id="description"></p>
9 <div id="console"></div>
10
11 <script>
12 description("Tests incorrect calls to crypto.subtle.digest()");
13
14 jsTestIsAsync = true;
15
16 Promise.resolve(null).then(function(result) {
17
18 debug("\ndigest() without data argument...");
19 return crypto.subtle.digest({name: 'sha-1'});
20 }).then(failAndFinishJSTest, function(result) {
21 logError(result);
22
23 debug("\ndigest() with data argument that is null...");
24 return crypto.subtle.digest({name: 'sha-1'}, null);
25 }).then(failAndFinishJSTest, function(result) {
26 logError(result);
27
28 debug("\ndigest() with data argument that is an integer...");
29 return crypto.subtle.digest({name: 'sha-1'}, 10);
30 }).then(failAndFinishJSTest, function(result) {
31 logError(result);
32
33 data = new Uint8Array([0]);
34 debug("\ndigest() with algorithm as null...");
35 return crypto.subtle.digest(null, data);
36 }).then(failAndFinishJSTest, function(result) {
37 logError(result);
38
39 debug("\ndigest() with invalid agorithm that is sha...");
40 return crypto.subtle.digest({name: 'sha'}, data);
41 }).then(failAndFinishJSTest, function(result) {
42 logError(result);
43
44 debug("\ndigest() without algorithm name...");
45 return crypto.subtle.digest({}, data);
46 }).then(failAndFinishJSTest, function(result) {
47 logError(result);
48
49 }).then(finishJSTest, failAndFinishJSTest);
50
51 </script>
52
53 </body>
54 </html>
OLDNEW
« no previous file with comments | « LayoutTests/crypto/digest-arraybuffer-expected.txt ('k') | LayoutTests/crypto/digest-failures-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698