blob: 827bdf6b2e5bc4a247c6c527265afd9e95c501d8 [file] [log] [blame]
Test WrapKey operation with malformed parameters
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS crypto.subtle.wrapKey() rejected promise with TypeError: Not enough arguments.
PASS crypto.subtle.wrapKey(1) rejected promise with TypeError: Not enough arguments.
PASS crypto.subtle.wrapKey(1, 2) rejected promise with TypeError: Not enough arguments.
PASS crypto.subtle.wrapKey(1, 2, 3) rejected promise with TypeError: Not enough arguments.
PASS crypto.subtle.wrapKey("raw", key, wrappingKey, "HMAC") rejected promise with NotSupportedError (DOM Exception 9): The operation is not supported..
PASS crypto.subtle.wrapKey("raw", key, wrappingKey, aesCbcParams) rejected promise with InvalidAccessError (DOM Exception 15): Wrapping CryptoKey doesn't match AlgorithmIdentifier.
PASS crypto.subtle.wrapKey("raw", key, wrappingKey, "AES-KW") rejected promise with InvalidAccessError (DOM Exception 15): The CryptoKey is nonextractable.
PASS crypto.subtle.wrapKey("raw", key, wrappingKey, "AES-KW") rejected promise with InvalidAccessError (DOM Exception 15): Wrapping CryptoKey doesn't support wrapKey operation.
PASS successfullyParsed is true
TEST COMPLETE