Index: LayoutTests/crypto/generateKey.html |
diff --git a/LayoutTests/crypto/generateKey.html b/LayoutTests/crypto/generateKey.html |
index fd2a424c0934a4db581b86081cb530d35b0c580c..6a14aaaca64f59e856fe82d56baca19259c5f809 100644 |
--- a/LayoutTests/crypto/generateKey.html |
+++ b/LayoutTests/crypto/generateKey.html |
@@ -90,6 +90,29 @@ crypto.subtle.generateKey({name: 'aes-cbc', length: 1024.9}, extractable, ['decr |
shouldBe("key.algorithm.hash.name", "'SHA-256'") |
shouldBe("key.algorithm.length", "48") |
shouldBe("key.usages.join(',')", "'sign'") |
+ |
+ return crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5', modulusLength: 10, publicExponent: new Uint8Array([0])}, false, ['sign']); |
+}).then(function(result) { |
+ keyPair = result; |
+ |
+ shouldBeDefined("keyPair.publicKey"); |
+ shouldBeDefined("keyPair.privateKey"); |
+ |
+ shouldBe("keyPair.publicKey.type", "'public'"); |
+ shouldBe("keyPair.publicKey.algorithm.name", "'RSASSA-PKCS1-v1_5'"); |
+ |
+ shouldBe("keyPair.privateKey.type", "'private'"); |
+ shouldBe("keyPair.privateKey.algorithm.name", "'RSASSA-PKCS1-v1_5'"); |
+ |
+ // KeyPair should return the same Key wrapper |
+ keyPair.publicKey.foo = "bar"; |
+ shouldBe("keyPair.publicKey.foo", "'bar'"); |
+ if (window.gc) { |
+ window.gc(); |
+ window.gc(); |
+ } |
+ shouldBe("keyPair.publicKey.foo", "'bar'"); |
+ |
}).then(finishJSTest, failAndFinishJSTest); |
</script> |