blob: 523a5148276348af0c0b22ca1f980fed78d051ab [file] [log] [blame]
Test exporting a key with malformed parameters
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS crypto.subtle.exportKey() rejected promise with TypeError: Not enough arguments.
PASS crypto.subtle.exportKey(1) rejected promise with TypeError: Not enough arguments.
PASS crypto.subtle.exportKey("raw", 1) rejected promise with TypeError: Argument 2 ('key') to SubtleCrypto.exportKey must be an instance of CryptoKey.
PASS crypto.subtle.exportKey("raw", true) rejected promise with TypeError: Argument 2 ('key') to SubtleCrypto.exportKey must be an instance of CryptoKey.
PASS crypto.subtle.exportKey("raw", null) rejected promise with TypeError: Argument 2 ('key') to SubtleCrypto.exportKey must be an instance of CryptoKey.
PASS crypto.subtle.exportKey("raw", undefined) rejected promise with TypeError: Argument 2 ('key') to SubtleCrypto.exportKey must be an instance of CryptoKey.
PASS crypto.subtle.exportKey("raw", Symbol()) rejected promise with TypeError: Argument 2 ('key') to SubtleCrypto.exportKey must be an instance of CryptoKey.
PASS crypto.subtle.exportKey("raw", { }) rejected promise with TypeError: Argument 2 ('key') to SubtleCrypto.exportKey must be an instance of CryptoKey.
PASS crypto.subtle.exportKey("raw", "foo") rejected promise with TypeError: Argument 2 ('key') to SubtleCrypto.exportKey must be an instance of CryptoKey.
PASS crypto.subtle.exportKey("raw", fakedKey) rejected promise with TypeError: Argument 2 ('key') to SubtleCrypto.exportKey must be an instance of CryptoKey.
PASS crypto.subtle.exportKey("raw", key) rejected promise with InvalidAccessError: The CryptoKey is nonextractable.
PASS successfullyParsed is true
TEST COMPLETE