Allow delayed error code in generic crypto
Merge from Widevine repo of http://go/wvgerrit/127246 The unit tests WvGenericCryptoTest expected an error code to be returned from SelectKey. But we allow an invalid key to be signaled either at SelectKey or later when the decrypt operation occurs. This CL just updates the tests. Bug: 190745519 Test: ran tests on bonito Change-Id: Ibacc92d6a6e708f2f104cb549b5845335f6c8cf5
This commit is contained in:
@@ -115,7 +115,7 @@ TEST_F(WvGenericCryptoTest, GenericEncryptNoKey) {
|
||||
cdm_sts = cdm_engine_.GenericEncrypt(
|
||||
holder_.session_id(), in_buffer_, key_id, iv_,
|
||||
wvcdm::kEncryptionAlgorithmAesCbc128, &out_buffer);
|
||||
EXPECT_EQ(NO_CONTENT_KEY_2, cdm_sts);
|
||||
EXPECT_NE(NO_ERROR, cdm_sts);
|
||||
EXPECT_NE(encrypted, out_buffer);
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ TEST_F(WvGenericCryptoTest, GenericDecryptNoKey) {
|
||||
cdm_sts = cdm_engine_.GenericDecrypt(
|
||||
holder_.session_id(), in_buffer_, key_id, iv_,
|
||||
wvcdm::kEncryptionAlgorithmAesCbc128, &out_buffer);
|
||||
EXPECT_EQ(NO_CONTENT_KEY_2, cdm_sts);
|
||||
EXPECT_NE(NO_ERROR, cdm_sts);
|
||||
EXPECT_NE(decrypted, out_buffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user