Merge pull request !10770 from 卢宇豪/guijin
This commit is contained in:
openharmony_ci 2024-11-14 14:08:52 +00:00 committed by Gitee
commit b6cb621357
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 22 additions and 2 deletions

View File

@ -461,7 +461,7 @@ HWTEST_F(WindowStubTest, OnRemoteRequest18, Function | SmallTest | Level2)
uint32_t code = static_cast<uint32_t>(IWindow::WindowMessage::TRANS_ID_UPDATE_WINDOW_STATE);
int res = windowStub_->OnRemoteRequest(code, data, reply, option);
EXPECT_EQ(res, static_cast<int>(ERR_NONE));
EXPECT_EQ(res, static_cast<int>(ERR_INVALID_DATA));
}
/**

View File

@ -315,7 +315,7 @@ HWTEST_F(WindowManagerStubTest, OnRemoteRequest13, Function | SmallTest | Level2
uint32_t code = static_cast<uint32_t>(IWindowManager::WindowManagerMessage::TRANS_ID_UPDATE_PROPERTY);
int res = stub_->OnRemoteRequest(code, data, reply, option);
EXPECT_EQ(res, static_cast<int>(ERR_INVALID_DATA));
EXPECT_EQ(res, static_cast<int>(ERR_NONE));
}
/**
@ -552,6 +552,26 @@ HWTEST_F(WindowManagerStubTest, OnRemoteRequest23, Function | SmallTest | Level2
int res = stub_->OnRemoteRequest(code, data, reply, option);
EXPECT_EQ(res, 0);
}
/**
* @tc.name: OnRemoteRequest24
* @tc.desc: test TRANS_ID_GET_SNAPSHOT success
* @tc.type: FUNC
*/
HWTEST_F(WindowManagerStubTest, OnRemoteRequest24, Function | SmallTest | Level2)
{
MessageParcel data;
MessageParcel reply;
MessageOption option;
data.WriteInterfaceToken(WindowManagerStub::GetDescriptor());
uint32_t writeValue = 0;
data.WriteInt32(writeValue);
uint32_t code = static_cast<uint32_t>(
IWindowManager::WindowManagerMessage::TRANS_ID_GET_SNAPSHOT);
int res = stub_->OnRemoteRequest(code, data, reply, option);
EXPECT_EQ(res, static_cast<int>(ERR_NONE));
}
}
}
}