| OLD | NEW |
| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // Undefined key usage. | 104 // Undefined key usage. |
| 105 // FIXME: http://crbug.com/262383 | 105 // FIXME: http://crbug.com/262383 |
| 106 //shouldThrow("crypto.subtle.importKey(keyFormat, data, algorithm, extractab
le, undefined)"); | 106 //shouldThrow("crypto.subtle.importKey(keyFormat, data, algorithm, extractab
le, undefined)"); |
| 107 | 107 |
| 108 // Invalid data | 108 // Invalid data |
| 109 shouldThrow("crypto.subtle.importKey(keyFormat, [], algorithm, extractable,
keyUsages)"); | 109 shouldThrow("crypto.subtle.importKey(keyFormat, [], algorithm, extractable,
keyUsages)"); |
| 110 shouldThrow("crypto.subtle.importKey(keyFormat, null, algorithm, extractable
, keyUsages)"); | 110 shouldThrow("crypto.subtle.importKey(keyFormat, null, algorithm, extractable
, keyUsages)"); |
| 111 | 111 |
| 112 // Missing hash parameter for HMAC. | 112 // Missing hash parameter for HMAC. |
| 113 shouldThrow("crypto.subtle.importKey(keyFormat, data, {name: 'hmac'}, extrac
table, keyUsages)"); | 113 shouldRejectPromiseWithNull("crypto.subtle.importKey(keyFormat, data, {name:
'hmac'}, extractable, keyUsages)"); |
| 114 | 114 |
| 115 // SHA-1 doesn't support the importKey operation. | 115 // SHA-1 doesn't support the importKey operation. |
| 116 shouldThrow("crypto.subtle.importKey(keyFormat, data, {name: 'sha-1'}, extra
ctable, keyUsages)"); | 116 shouldThrow("crypto.subtle.importKey(keyFormat, data, {name: 'sha-1'}, extra
ctable, keyUsages)"); |
| 117 }).then(finishJSTest, failAndFinishJSTest); | 117 }).then(finishJSTest, failAndFinishJSTest); |
| 118 | 118 |
| 119 </script> | 119 </script> |
| 120 | 120 |
| 121 </body> | 121 </body> |
| 122 </html> | 122 </html> |
| OLD | NEW |