mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-26 16:40:56 +00:00
修改TDD
Signed-off-by: w00845523 <13643413997@163.com>
This commit is contained in:
parent
d2615d5fa4
commit
8aa6447e64
@ -994,6 +994,7 @@ HWTEST_F(SceneSessionManagerTest, SetScreenLocked001, Function | SmallTest | Lev
|
||||
sceneSession->handler_->PostTask(task, taskName, delayTime);
|
||||
int32_t beforeTaskNum = GetTaskCount(sceneSession);
|
||||
ssm_->SetScreenLocked(true);
|
||||
sleep(1);
|
||||
ASSERT_EQ(beforeTaskNum - 1, GetTaskCount(sceneSession));
|
||||
ASSERT_EQ(DetectTaskState::NO_TASK, sceneSession->detectTaskInfo_.taskState);
|
||||
ASSERT_EQ(WindowMode::WINDOW_MODE_UNDEFINED, sceneSession->detectTaskInfo_.taskWindowMode);
|
||||
|
@ -1689,8 +1689,10 @@ HWTEST_F(SceneSessionManagerTest3, IsScreenLocked, Function | SmallTest | Level3
|
||||
{
|
||||
ssm_->sceneSessionMap_.clear();
|
||||
ssm_->SetScreenLocked(true);
|
||||
sleep(1);
|
||||
EXPECT_TRUE(ssm_->IsScreenLocked());
|
||||
ssm_->SetScreenLocked(false);
|
||||
sleep(1);
|
||||
EXPECT_FALSE(ssm_->IsScreenLocked());
|
||||
}
|
||||
|
||||
|
@ -396,12 +396,14 @@ HWTEST_F(SceneSessionManagerTest6, IsScreenLocked, Function | SmallTest | Level3
|
||||
{
|
||||
ASSERT_NE(nullptr, ssm_);
|
||||
ssm_->SetScreenLocked(true);
|
||||
sleep(1);
|
||||
ASSERT_NE(nullptr, ssm_);
|
||||
EXPECT_TRUE(ssm_->IsScreenLocked());
|
||||
ASSERT_NE(nullptr, ssm_);
|
||||
ssm_->ProcessWindowModeType();
|
||||
ASSERT_NE(nullptr, ssm_);
|
||||
ssm_->SetScreenLocked(false);
|
||||
sleep(1);
|
||||
ASSERT_NE(nullptr, ssm_);
|
||||
EXPECT_FALSE(ssm_->IsScreenLocked());
|
||||
ASSERT_NE(nullptr, ssm_);
|
||||
@ -1586,6 +1588,7 @@ HWTEST_F(SceneSessionManagerTest6, DeleteStateDetectTask, Function | SmallTest |
|
||||
{
|
||||
ASSERT_NE(nullptr, ssm_);
|
||||
ssm_->SetScreenLocked(true);
|
||||
sleep(1);
|
||||
EXPECT_EQ(true, ssm_->isScreenLocked_);
|
||||
ssm_->sceneSessionMap_.clear();
|
||||
ASSERT_NE(nullptr, ssm_);
|
||||
|
@ -1681,6 +1681,7 @@ HWTEST_F(WindowSessionTest2, SetShowRecent004, Function | SmallTest | Level2)
|
||||
{
|
||||
session_->systemConfig_.windowUIType_ = WindowUIType::PHONE_WINDOW;
|
||||
ssm_->SetScreenLocked(false);
|
||||
sleep(1);
|
||||
|
||||
session_->property_ = new WindowSessionProperty();
|
||||
session_->property_->SetWindowType(WindowType::APP_MAIN_WINDOW_BASE);
|
||||
@ -2310,16 +2311,19 @@ HWTEST_F(WindowSessionTest2, IsSupportDetectWindow, Function | SmallTest | Level
|
||||
{
|
||||
session_->systemConfig_.windowUIType_ = WindowUIType::PHONE_WINDOW;
|
||||
ssm_->SetScreenLocked(true);
|
||||
sleep(1);
|
||||
bool ret = session_->IsSupportDetectWindow(true);
|
||||
ASSERT_EQ(ret, false);
|
||||
|
||||
ssm_->SetScreenLocked(false);
|
||||
sleep(1);
|
||||
session_->property_ = new WindowSessionProperty();
|
||||
session_->property_->SetWindowType(WindowType::APP_MAIN_WINDOW_END);
|
||||
ret = session_->IsSupportDetectWindow(true);
|
||||
ASSERT_EQ(ret, false);
|
||||
|
||||
ssm_->SetScreenLocked(false);
|
||||
sleep(1);
|
||||
session_->property_->SetWindowType(WindowType::APP_MAIN_WINDOW_BASE);
|
||||
session_->systemConfig_.windowUIType_ = WindowUIType::PC_WINDOW;
|
||||
ret = session_->IsSupportDetectWindow(false);
|
||||
|
Loading…
Reference in New Issue
Block a user