Remove extra enumeration
This is a merge of http://go/wvgerrit/13751 from the widevine repository. The CryptoSession had an enumeration for HDCP levels that was copied from OEMCryptoCENC.h by hand. Since that header is included, there is no need to have two enumerations. b/16303994 Change-Id: Ief16ba62163776f9ca80375f3638ef4c7770e742
This commit is contained in:
@@ -97,8 +97,7 @@ class MockCryptoSession : public CryptoSession {
|
||||
MOCK_METHOD0(IsOpen, bool());
|
||||
MOCK_METHOD1(GenerateRequestId, bool(std::string*));
|
||||
MOCK_METHOD1(UsageInformationSupport, bool(bool*));
|
||||
MOCK_METHOD2(GetHdcpCapabilities,
|
||||
bool(OemCryptoHdcpVersion*, OemCryptoHdcpVersion*));
|
||||
MOCK_METHOD2(GetHdcpCapabilities, bool(HdcpCapability*, HdcpCapability*));
|
||||
MOCK_METHOD1(GetApiVersion, bool(uint32_t*));
|
||||
MOCK_METHOD1(GenerateNonce, bool(uint32_t*));
|
||||
MOCK_METHOD3(PrepareRequest, bool(const std::string&, bool, std::string*));
|
||||
@@ -178,10 +177,8 @@ TEST_F(CdmLicenseTest, InitFail_PolicyEngineNull) {
|
||||
|
||||
TEST_F(CdmLicenseTest, PrepareKeyRequestValidation) {
|
||||
bool usage_information_support = true;
|
||||
CryptoSession::OemCryptoHdcpVersion current_hdcp_version =
|
||||
CryptoSession::kOemCryptoNoHdcpDeviceAttached;
|
||||
CryptoSession::OemCryptoHdcpVersion max_hdcp_version =
|
||||
CryptoSession::kOemCryptoHdcpVersion2_1;
|
||||
CryptoSession::HdcpCapability current_hdcp_version = HDCP_NO_DIGITAL_OUTPUT;
|
||||
CryptoSession::HdcpCapability max_hdcp_version = HDCP_V2_1;
|
||||
uint32_t crypto_session_api_version = 9;
|
||||
|
||||
EXPECT_CALL(*crypto_session_, IsOpen()).WillOnce(Return(true));
|
||||
|
||||
@@ -49,8 +49,7 @@ const int64_t kHdcpInterval = 10;
|
||||
|
||||
class HdcpOnlyMockCryptoSession : public CryptoSession {
|
||||
public:
|
||||
MOCK_METHOD2(GetHdcpCapabilities,
|
||||
bool(OemCryptoHdcpVersion*, OemCryptoHdcpVersion*));
|
||||
MOCK_METHOD2(GetHdcpCapabilities, bool(HdcpCapability*, HdcpCapability*));
|
||||
};
|
||||
|
||||
ACTION_P2(IncrementAndReturnPointee, p, a) {
|
||||
@@ -188,7 +187,7 @@ TEST_F(MaxResEngineTest, IsPermissiveWithoutAResolution) {
|
||||
TEST_F(MaxResEngineTest, HandlesResolutionsBasedOnConstraints) {
|
||||
EXPECT_CALL(crypto_session_, GetHdcpCapabilities(_, _))
|
||||
.WillRepeatedly(
|
||||
DoAll(SetArgPointee<0>(CryptoSession::kOemCryptoNoHdcpDeviceAttached),
|
||||
DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT),
|
||||
Return(true)));
|
||||
|
||||
max_res_engine_->SetLicense(license_);
|
||||
@@ -229,14 +228,14 @@ TEST_F(MaxResEngineTest, RequestsHdcpImmediatelyAndOnlyAfterInterval) {
|
||||
EXPECT_CALL(*mock_clock_, GetCurrentTime()).WillOnce(Return(start_time));
|
||||
EXPECT_CALL(crypto_session_, GetHdcpCapabilities(_, _))
|
||||
.WillOnce(
|
||||
DoAll(SetArgPointee<0>(CryptoSession::kOemCryptoHdcpVersion2_2),
|
||||
DoAll(SetArgPointee<0>(HDCP_V2_2),
|
||||
Return(true)));
|
||||
EXPECT_CALL(*mock_clock_, GetCurrentTime())
|
||||
.WillOnce(Return(start_time + kHdcpInterval / 2))
|
||||
.WillOnce(Return(start_time + kHdcpInterval));
|
||||
EXPECT_CALL(crypto_session_, GetHdcpCapabilities(_, _))
|
||||
.WillOnce(
|
||||
DoAll(SetArgPointee<0>(CryptoSession::kOemCryptoHdcpVersion2_2),
|
||||
DoAll(SetArgPointee<0>(HDCP_V2_2),
|
||||
Return(true)));
|
||||
}
|
||||
|
||||
@@ -256,7 +255,7 @@ TEST_F(MaxResEngineTest, DoesNotRequestHdcpWithoutALicense) {
|
||||
TEST_F(MaxResEngineTest, HandlesConstraintOverridingHdcp) {
|
||||
EXPECT_CALL(crypto_session_, GetHdcpCapabilities(_, _))
|
||||
.WillRepeatedly(
|
||||
DoAll(SetArgPointee<0>(CryptoSession::kOemCryptoHdcpVersion2),
|
||||
DoAll(SetArgPointee<0>(HDCP_V2),
|
||||
Return(true)));
|
||||
|
||||
max_res_engine_->SetLicense(license_);
|
||||
@@ -283,7 +282,7 @@ TEST_F(MaxResEngineTest, HandlesConstraintOverridingHdcp) {
|
||||
TEST_F(MaxResEngineTest, HandlesNoHdcp) {
|
||||
EXPECT_CALL(crypto_session_, GetHdcpCapabilities(_, _))
|
||||
.WillRepeatedly(
|
||||
DoAll(SetArgPointee<0>(CryptoSession::kOemCryptoHdcpNotSupported),
|
||||
DoAll(SetArgPointee<0>(HDCP_NONE),
|
||||
Return(true)));
|
||||
|
||||
max_res_engine_->SetLicense(license_);
|
||||
|
||||
Reference in New Issue
Block a user