修改TDD

Signed-off-by: w00845523 <13643413997@163.com>
This commit is contained in:
w00845523 2024-11-22 09:12:21 +08:00
parent 610c46d5f7
commit a6d84e9341
2 changed files with 9 additions and 9 deletions

View File

@ -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));
}
/**

View File

@ -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));
}
/**