blob: 6f953543c37ba5f04c7806b7c89ef974f13f0b4b [file] [log] [blame]
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