| OLD | NEW |
| 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 Loading... |
| 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> |
| OLD | NEW |