| 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 <script> | 8 <script> |
| 9 description("Check that an already imported key with empty usages can be deseria
lized."); | 9 description("Check that an already imported key with empty usages can be deseria
lized."); |
| 10 | 10 |
| 11 // It used to be possible to import keys with empty usages, it is possible that | 11 // It used to be possible to import keys with empty usages, it is possible that |
| 12 // such keys were persisted to storage. This test verifies that such keys can | 12 // such keys were persisted to storage. This test verifies that such keys can |
| 13 // still be successfully de-serialized. | 13 // still be successfully de-serialized. |
| 14 | 14 |
| 15 // The version number of the serialized format used is 7. | 15 // The version number of the serialized format used is 7. |
| 16 | 16 |
| 17 var serializedKey = "ff073f004b010110011030112233445566778899aabbccddeeff"; | 17 var serializedKey = "ff073f004b010110011030112233445566778899aabbccddeeff"; |
| 18 | 18 |
| 19 var key = internals.deserializeBuffer(hexStringToUint8Array(serializedKey).buffe
r); | 19 var key = internals.deserializeBuffer(hexStringToUint8Array(serializedKey).buffe
r); |
| 20 | 20 |
| 21 shouldBeEqualToString("key.type", "secret"); | 21 shouldBeEqualToString("key.type", "secret"); |
| 22 shouldBeTrue("key.extractable"); | 22 shouldBeTrue("key.extractable"); |
| 23 shouldBeEqualToString("key.algorithm.name", "AES-CBC"); | 23 shouldBeEqualToString("key.algorithm.name", "AES-CBC"); |
| 24 shouldBe("key.usages", "[]"); | 24 shouldBe("key.usages", "[]"); |
| 25 | 25 |
| 26 </script> | 26 </script> |
| 27 </body> | 27 </body> |
| 28 </html> | 28 </html> |
| 29 | 29 |
| OLD | NEW |