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

Side by Side Diff: LayoutTests/crypto/ecdsa-generateKey-parseAlgorithm-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 generateKey() with bad ECDSA parameters.");
13 jsTestIsAsync = true;
14
15 extractable = true;
16 keyUsages = ['sign', 'verify'];
17
18 Promise.resolve(null).then(function() {
19 debug("\ngenerateKey() without namedCurve...");
20 return crypto.subtle.generateKey({name: 'ECDSA'}, extractable , keyUsages);
21 }).then(failAndFinishJSTest, function(result) {
22 logError(result);
23
24 debug("\ngenerateKey() with namedCurve that is an integer...");
25 return crypto.subtle.generateKey({name: 'ECDSA', namedCurve: -1}, extractabl e , keyUsages);
26 }).then(failAndFinishJSTest, function(result) {
27 logError(result);
28
29 debug("\ngenerateKey() with namedCurve 'p-256' that contains lower case char acter 'p'...");
30 return crypto.subtle.generateKey({name: 'ECDSA', namedCurve: 'p-256'}, extra ctable , keyUsages);
31 }).then(failAndFinishJSTest, function(result) {
32 logError(result);
33
34 debug("\ngenerateKey() with namedCurve 'P-256aa' that contains trailing char acters 'aa'...");
35 return crypto.subtle.generateKey({name: 'ECDSA', namedCurve: 'P-256aa'}, ext ractable , keyUsages);
36 }).then(failAndFinishJSTest, function(result) {
37 logError(result);
38 }).then(finishJSTest, failAndFinishJSTest);
39
40 </script>
41
42 </body>
43 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698