blob: 69b66979f68030800c39104fb4c78b083723cf5d [file] [log] [blame]
Test encrypting with malformed parameters
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS crypto.subtle.encrypt() rejected promise with TypeError: Not enough arguments.
PASS crypto.subtle.encrypt(1) rejected promise with TypeError: Not enough arguments.
PASS crypto.subtle.encrypt(1, 2) rejected promise with TypeError: Not enough arguments.
PASS crypto.subtle.encrypt(aesCbcParams, fakedKey, plainText) rejected promise with TypeError: Argument 2 ('key') to SubtleCrypto.encrypt must be an instance of CryptoKey.
PASS crypto.subtle.encrypt(aesCbcParams, wrongKey, plainText) rejected promise with InvalidAccessError: CryptoKey doesn't match AlgorithmIdentifier.
PASS crypto.subtle.encrypt(aesCbcParams, wrongKey, plainText) rejected promise with InvalidAccessError: CryptoKey doesn't support encryption.
PASS successfullyParsed is true
TEST COMPLETE