| <script src="../resources/js-test-pre.js"></script> |
| <script src="resources/common.js"></script> |
| description("Test that CryptoKey.algorithm preserves custom properties."); |
| debug("\nGenerating a HMAC key with default length..."); |
| crypto.subtle.generateKey({name: "hmac", hash: "sha-1"}, true, ["sign", "verify"]).then(function(result) { |
| shouldBeTrue("key.algorithm === key.algorithm"); |
| key.algorithm.foo = "bar"; |
| setTimeout(continueTest, 10); |
| setTimeout(finishTest, 10); |
| shouldBeEqualToString('key.algorithm.foo', 'bar'); |
| <script src="../resources/js-test-post.js"></script> |