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

Side by Side Diff: LayoutTests/crypto/subtle/unwrapKey-badParameters.html

Issue 978353002: Add [TypeChecking=Unrestricted] to SubtleCrypto interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <script src="resources/common.js"></script> 5 <script src="resources/common.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <p id="description"></p> 8 <p id="description"></p>
9 <div id="console"></div> 9 <div id="console"></div>
10 10
(...skipping 23 matching lines...) Expand all
34 return crypto.subtle.unwrapKey('raw', null, unwrappingKey, unwrapAlgorithm, unwrappedKeyAlgorithm, extractable, keyUsages); 34 return crypto.subtle.unwrapKey('raw', null, unwrappingKey, unwrapAlgorithm, unwrappedKeyAlgorithm, extractable, keyUsages);
35 }).then(failAndFinishJSTest, function(result) { 35 }).then(failAndFinishJSTest, function(result) {
36 logError(result); 36 logError(result);
37 37
38 // Invalid unwrappingKey 38 // Invalid unwrappingKey
39 return crypto.subtle.unwrapKey('raw', wrappedKey, 'hi', unwrapAlgorithm, unw rappedKeyAlgorithm, extractable, keyUsages); 39 return crypto.subtle.unwrapKey('raw', wrappedKey, 'hi', unwrapAlgorithm, unw rappedKeyAlgorithm, extractable, keyUsages);
40 }).then(failAndFinishJSTest, function(result) { 40 }).then(failAndFinishJSTest, function(result) {
41 logError(result); 41 logError(result);
42 42
43 // Invalid keyUsages (also, unwrappedKeyAlgorithm is set to null). 43 // Invalid keyUsages (also, unwrappedKeyAlgorithm is set to null).
44 return crypto.subtle.unwrapKey('raw', wrappedKey, 'hi', unwrapAlgorithm, nul l, extractable, 9); 44 return crypto.subtle.unwrapKey('raw', wrappedKey, unwrappingKey, unwrapAlgor ithm, null, extractable, 9);
45 }).then(failAndFinishJSTest, function(result) { 45 }).then(failAndFinishJSTest, function(result) {
46 logError(result); 46 logError(result);
47 47
48 // Invalid unwrapAlgorithm 48 // Invalid unwrapAlgorithm
49 return crypto.subtle.unwrapKey('raw', wrappedKey, unwrappingKey, null, unwra ppedKeyAlgorithm, extractable, keyUsages); 49 return crypto.subtle.unwrapKey('raw', wrappedKey, unwrappingKey, null, unwra ppedKeyAlgorithm, extractable, keyUsages);
50 }).then(failAndFinishJSTest, function(result) { 50 }).then(failAndFinishJSTest, function(result) {
51 logError(result); 51 logError(result);
52 52
53 // Invalid unwrappedKeyAlgorithm (specified but bad). 53 // Invalid unwrappedKeyAlgorithm (specified but bad).
54 return crypto.subtle.unwrapKey('raw', wrappedKey, unwrappingKey, unwrapAlgor ithm, 3, extractable, keyUsages); 54 return crypto.subtle.unwrapKey('raw', wrappedKey, unwrappingKey, unwrapAlgor ithm, 3, extractable, keyUsages);
(...skipping 14 matching lines...) Expand all
69 aesCtrAlgorithm = {name: 'AES-CTR', counter: new Uint8Array(16), length: 0}; 69 aesCtrAlgorithm = {name: 'AES-CTR', counter: new Uint8Array(16), length: 0};
70 return crypto.subtle.unwrapKey('raw', wrappedKey, unwrappingKey, aesCtrAlgor ithm, unwrappedKeyAlgorithm, extractable, keyUsages); 70 return crypto.subtle.unwrapKey('raw', wrappedKey, unwrappingKey, aesCtrAlgor ithm, unwrappedKeyAlgorithm, extractable, keyUsages);
71 }).then(failAndFinishJSTest, function(result) { 71 }).then(failAndFinishJSTest, function(result) {
72 logError(result); 72 logError(result);
73 }).then(finishJSTest, failAndFinishJSTest); 73 }).then(finishJSTest, failAndFinishJSTest);
74 74
75 </script> 75 </script>
76 76
77 </body> 77 </body>
78 </html> 78 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698