haikuwebkit/LayoutTests/crypto/subtle/sign-malformed-parameters-e...

15 lines
699 B
Plaintext

Test signing with malformed parameters
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS crypto.subtle.sign() rejected promise with TypeError: Not enough arguments.
PASS crypto.subtle.sign(1) rejected promise with TypeError: Not enough arguments.
PASS crypto.subtle.sign(1, 2) rejected promise with TypeError: Not enough arguments.
PASS crypto.subtle.sign("rsassa-pkcs1-v1_5", wrongKey, text) rejected promise with InvalidAccessError: CryptoKey doesn't match AlgorithmIdentifier.
PASS crypto.subtle.sign("hmac", wrongKey, text) rejected promise with InvalidAccessError: CryptoKey doesn't support signing.
PASS successfullyParsed is true
TEST COMPLETE