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 <script src="resources/common.js"></script> |
5 </head> | 6 </head> |
6 <body> | 7 <body> |
7 <p id="description"></p> | 8 <p id="description"></p> |
8 <div id="console"></div> | 9 <div id="console"></div> |
9 | 10 |
10 <script> | 11 <script> |
11 description("Tests cypto.subtle.importKey."); | 12 description("Tests cypto.subtle.importKey."); |
12 | 13 |
13 jsTestIsAsync = true; | 14 jsTestIsAsync = true; |
14 | 15 |
15 function asciiToArrayBuffer(str) | |
16 { | |
17 var chars = []; | |
18 for (var i = 0; i < str.length; ++i) | |
19 chars.push(str.charCodeAt(i)); | |
20 return new Uint8Array(chars); | |
21 } | |
22 | |
23 // Each sub-test run in this file is asynchronous. Chaining them together | 16 // Each sub-test run in this file is asynchronous. Chaining them together |
24 // manually leads to very unreadable code, due to having closures within | 17 // manually leads to very unreadable code, due to having closures within |
25 // closures within closures. Instead of doing that, each subtest calls | 18 // closures within closures. Instead of doing that, each subtest calls |
26 // "startNextTest()" once it has completed. | 19 // "startNextTest()" once it has completed. |
27 | 20 |
28 currentTestIndex = 0; | 21 currentTestIndex = 0; |
29 | 22 |
30 function startNextTest() | 23 function startNextTest() |
31 { | 24 { |
32 var currentTest = allTests[currentTestIndex++]; | 25 var currentTest = allTests[currentTestIndex++]; |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 218 |
226 ]; | 219 ]; |
227 | 220 |
228 // Begin! | 221 // Begin! |
229 startNextTest(); | 222 startNextTest(); |
230 </script> | 223 </script> |
231 | 224 |
232 <script src="../fast/js/resources/js-test-post.js"></script> | 225 <script src="../fast/js/resources/js-test-post.js"></script> |
233 </body> | 226 </body> |
234 </html> | 227 </html> |
OLD | NEW |