mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-27 00:51:35 +00:00
修改TDD
Signed-off-by: w00845523 <13643413997@163.com>
This commit is contained in:
parent
610c46d5f7
commit
a6d84e9341
@ -1429,16 +1429,16 @@ HWTEST_F(SceneSessionManagerTest, TestIsEnablePiPCreate, Function | SmallTest |
|
||||
GTEST_LOG_(INFO) << "SceneSessionManagerTest: TestIsEnablePiPCreate start";
|
||||
ssm_->isScreenLocked_ = true;
|
||||
sptr<WindowSessionProperty> property = new (std::nothrow) WindowSessionProperty();
|
||||
ASSERT_TRUE(!ssm_->isEnablePiPCreate(property));
|
||||
ASSERT_TRUE(!ssm_->IsEnablePiPCreate(property));
|
||||
|
||||
ssm_->isScreenLocked_ = false;
|
||||
Rect reqRect = { 0, 0, 0, 0 };
|
||||
property->SetRequestRect(reqRect);
|
||||
ASSERT_TRUE(!ssm_->isEnablePiPCreate(property));
|
||||
ASSERT_TRUE(!ssm_->IsEnablePiPCreate(property));
|
||||
|
||||
reqRect = { 0, 0, 10, 0 };
|
||||
property->SetRequestRect(reqRect);
|
||||
ASSERT_TRUE(!ssm_->isEnablePiPCreate(property));
|
||||
ASSERT_TRUE(!ssm_->IsEnablePiPCreate(property));
|
||||
|
||||
reqRect = { 0, 0, 10, 10 };
|
||||
property->SetRequestRect(reqRect);
|
||||
@ -1452,20 +1452,20 @@ HWTEST_F(SceneSessionManagerTest, TestIsEnablePiPCreate, Function | SmallTest |
|
||||
property->SetWindowMode(WindowMode::WINDOW_MODE_PIP);
|
||||
sceneSession->pipTemplateInfo_ = {0, 100, {}};
|
||||
ssm_->sceneSessionMap_.insert({0, sceneSession});
|
||||
ASSERT_TRUE(!ssm_->isEnablePiPCreate(property));
|
||||
ASSERT_TRUE(!ssm_->IsEnablePiPCreate(property));
|
||||
ssm_->sceneSessionMap_.clear();
|
||||
ASSERT_TRUE(!ssm_->isEnablePiPCreate(property));
|
||||
ASSERT_TRUE(!ssm_->IsEnablePiPCreate(property));
|
||||
|
||||
property->SetParentPersistentId(100);
|
||||
ASSERT_TRUE(!ssm_->isEnablePiPCreate(property));
|
||||
ASSERT_TRUE(!ssm_->IsEnablePiPCreate(property));
|
||||
|
||||
ssm_->sceneSessionMap_.insert({100, sceneSession});
|
||||
ASSERT_TRUE(!ssm_->isEnablePiPCreate(property));
|
||||
ASSERT_TRUE(!ssm_->IsEnablePiPCreate(property));
|
||||
|
||||
ssm_->sceneSessionMap_.clear();
|
||||
sceneSession->SetSessionState(SessionState::STATE_FOREGROUND);
|
||||
ssm_->sceneSessionMap_.insert({100, sceneSession});
|
||||
ASSERT_TRUE(ssm_->isEnablePiPCreate(property));
|
||||
ASSERT_TRUE(ssm_->IsEnablePiPCreate(property));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2071,7 +2071,7 @@ HWTEST_F(SceneSessionManagerTest2, ClosePipWindowIfExist, Function | SmallTest |
|
||||
Rect reqRect = { 0, 0, 10, 10 };
|
||||
property->SetRequestRect(reqRect);
|
||||
property->SetWindowMode(WindowMode::WINDOW_MODE_PIP);
|
||||
ASSERT_EQ(false, ssm_->isEnablePiPCreate(property));
|
||||
ASSERT_EQ(false, ssm_->(property));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user