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:
Edwin Wong
2017-05-31 09:05:57 -07:00
parent 106858bc84
commit 262219114b
2 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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) {