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

Side by Side Diff: LayoutTests/crypto/normalize-algorithm.html

Issue 20475004: WebCrypto: Properly normalize algorithm for importKey(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/crypto/importKey-expected.txt ('k') | Source/modules/crypto/NormalizeAlgorithm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../fast/js/resources/js-test-pre.js"></script> 4 <script src="../fast/js/resources/js-test-pre.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p id="description"></p> 7 <p id="description"></p>
8 <div id="console"></div> 8 <div id="console"></div>
9 9
10 <script> 10 <script>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 function failedKeyImport(value) 145 function failedKeyImport(value)
146 { 146 {
147 debug("Failed importing key: " + value); 147 debug("Failed importing key: " + value);
148 finishJSTest(); 148 finishJSTest();
149 } 149 }
150 150
151 // This is a bogus key import, however the mock constructs something usable. 151 // This is a bogus key import, however the mock constructs something usable.
152 keyFormat = "spki"; 152 keyFormat = "spki";
153 data = new Uint8Array([]); 153 data = new Uint8Array([]);
154 algorithm = {name: "Sha-256"}; 154 algorithm = {name: "aes-cbc"};
155 extractable = false; 155 extractable = false;
156 keyUsages = []; 156 keyUsages = [];
157 157
158 crypto.subtle.importKey(keyFormat, data, algorithm, extractable, keyUsages).then (keyImported, failedKeyImport); 158 crypto.subtle.importKey(keyFormat, data, algorithm, extractable, keyUsages).then (keyImported, failedKeyImport);
159 159
160 </script> 160 </script>
161 161
162 <script src="../fast/js/resources/js-test-post.js"></script> 162 <script src="../fast/js/resources/js-test-post.js"></script>
163 </body> 163 </body>
164 </html> 164 </html>
OLDNEW
« no previous file with comments | « LayoutTests/crypto/importKey-expected.txt ('k') | Source/modules/crypto/NormalizeAlgorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698