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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 // Missing hash parameter for HMAC. | 56 // Missing hash parameter for HMAC. |
57 return crypto.subtle.importKey('raw', new Uint8Array(20), {name: 'hmac'}, ex
tractable, ['sign']); | 57 return crypto.subtle.importKey('raw', new Uint8Array(20), {name: 'hmac'}, ex
tractable, ['sign']); |
58 }).then(failAndFinishJSTest, function(result) { | 58 }).then(failAndFinishJSTest, function(result) { |
59 logError(result); | 59 logError(result); |
60 | 60 |
61 // SHA-1 doesn't support the importKey operation. | 61 // SHA-1 doesn't support the importKey operation. |
62 return crypto.subtle.importKey('raw', new Uint8Array(20), {name: 'sha-1'}, e
xtractable, ['sign']); | 62 return crypto.subtle.importKey('raw', new Uint8Array(20), {name: 'sha-1'}, e
xtractable, ['sign']); |
63 }).then(failAndFinishJSTest, function(result) { | 63 }).then(failAndFinishJSTest, function(result) { |
64 logError(result); | 64 logError(result); |
| 65 |
| 66 // SharedArrayBuffer-backed view is not allowed. |
| 67 if (window.SharedArrayBuffer) { |
| 68 var bytes = new Uint8Array(new SharedArrayBuffer(16)); |
| 69 return crypto.subtle.importKey('raw', bytes, aesCbc, extractable, ['encr
ypt']); |
| 70 } else { |
| 71 return Promise.reject('SharedArrayBuffers not enabled.'); |
| 72 } |
| 73 }).then(failAndFinishJSTest, function(result) { |
| 74 logError(result); |
65 }).then(finishJSTest, failAndFinishJSTest); | 75 }).then(finishJSTest, failAndFinishJSTest); |
66 | 76 |
67 </script> | 77 </script> |
68 | 78 |
69 </body> | 79 </body> |
70 </html> | 80 </html> |
OLD | NEW |