Fix and rename ClosesSessionWithoutReturningError test.
Merge from http://go/wvgerrit/27880 ClosesSessionWithoutReturningError should not check for Status::OK since it is expecting an error code back. The test is renamed to ClosesSessionWithError. Test: libwvdrmdrmplugin_hidl_test bug: 62205215 Change-Id: Ic57733c6adc7242413cf3cb74f03ac41f764c42c
This commit is contained in:
@@ -319,7 +319,7 @@ TEST_F(WVDrmPluginTest, ClosesSessions) {
|
||||
ASSERT_EQ(Status::OK, status);
|
||||
}
|
||||
|
||||
TEST_F(WVDrmPluginTest, ClosesSessionWithoutReturningError) {
|
||||
TEST_F(WVDrmPluginTest, ClosesSessionWithError) {
|
||||
android::sp<StrictMock<MockCDM>> cdm = new StrictMock<MockCDM>();
|
||||
StrictMock<MockCrypto> crypto;
|
||||
std::string appPackageName;
|
||||
@@ -329,7 +329,7 @@ TEST_F(WVDrmPluginTest, ClosesSessionWithoutReturningError) {
|
||||
|
||||
WVDrmPlugin plugin(cdm.get(), appPackageName, &crypto, false);
|
||||
Status status = plugin.closeSession(toHidlVec(sessionId));
|
||||
ASSERT_EQ(Status::OK, status);
|
||||
ASSERT_EQ(Status::ERROR_DRM_SESSION_NOT_OPENED, status);
|
||||
}
|
||||
|
||||
// TODO b/35325611 Fix this disabled test
|
||||
|
||||
@@ -227,7 +227,7 @@ TEST_F(WVDrmPluginTest, ClosesSessions) {
|
||||
ASSERT_EQ(OK, res);
|
||||
}
|
||||
|
||||
TEST_F(WVDrmPluginTest, ClosesSessionWithoutReturningError) {
|
||||
TEST_F(WVDrmPluginTest, ClosesSessionWithError) {
|
||||
android::sp<StrictMock<MockCDM>> cdm = new StrictMock<MockCDM>();
|
||||
StrictMock<MockCrypto> crypto;
|
||||
WVDrmPlugin plugin(cdm.get(), &crypto);
|
||||
@@ -237,7 +237,7 @@ TEST_F(WVDrmPluginTest, ClosesSessionWithoutReturningError) {
|
||||
|
||||
status_t res = plugin.closeSession(sessionId);
|
||||
|
||||
ASSERT_EQ(OK, res);
|
||||
ASSERT_EQ(ERROR_DRM_SESSION_NOT_OPENED, res);
|
||||
}
|
||||
|
||||
TEST_F(WVDrmPluginTest, GeneratesKeyRequests) {
|
||||
|
||||
Reference in New Issue
Block a user