Signed-off-by: cjl <chenjunliang26@h-partners.com>
This commit is contained in:
cjl 2024-07-18 10:47:31 +08:00
parent a5c41a661a
commit 5d6442bed0

View File

@ -236,9 +236,10 @@ HWTEST_F(SceneSessionTest4, isNeedSystemPermissionByAction, Function | SmallTest
{ {
sptr<SceneSession> session = sptr<SceneSession>::MakeSptr(info, nullptr); sptr<SceneSession> session = sptr<SceneSession>::MakeSptr(info, nullptr);
EXPECT_NE(session, nullptr); EXPECT_NE(session, nullptr);
session.property_ = new WindowSessionProperty();
session->property_->SetWindowFlags(0); session->property_->SetWindowFlags(0);
ASSERT_NE(session->GetSessionProperty(), nullptr); auto sessionProperty = session->GetSessionProperty();
ASSERT_TRUE(sceneSession->isNeedSystemPermissionByAction(WSPropertyChangeAction::ACTION_UPDATE_TURN_SCREEN_ON, ASSERT_TRUE(sceneSession->isNeedSystemPermissionByAction(WSPropertyChangeAction::ACTION_UPDATE_TURN_SCREEN_ON,
property, sessionProperty)); property, sessionProperty));
ASSERT_TRUE(sceneSession->isNeedSystemPermissionByAction(WSPropertyChangeAction::ACTION_UPDATE_FLAGS, ASSERT_TRUE(sceneSession->isNeedSystemPermissionByAction(WSPropertyChangeAction::ACTION_UPDATE_FLAGS,