sync_tdd_master_1104

Signed-off-by: tyh <tanyuhang@huawei.com>
Change-Id: I7fbc4a294fda00373dd9b33fb05a8155abf54c2f
This commit is contained in:
tyh 2024-11-04 15:37:48 +08:00
parent 234b6b6e6b
commit e514f33d4b

View File

@ -217,17 +217,25 @@ HWTEST_F(WindowMultiAbilityTest, MultiAbilityWindow2, Function | MediumTest | Le
HWTEST_F(WindowMultiAbilityTest, MultiAbilityWindow03, Function | MediumTest | Level3)
{
sptr<WindowScene> scene1 = Utils::CreateWindowScene();
ASSERT_EQ(WMError::WM_ERROR_NULLPTR, scene1->GoForeground());
if (!SceneBoardJudgement::IsSceneBoardEnabled()) {
ASSERT_EQ(WMError::WM_OK, scene1->GoForeground());
} else {
ASSERT_EQ(WMError::WM_ERROR_NULLPTR, scene1->GoForeground());
}
sptr<WindowScene> scene2 = Utils::CreateWindowScene();
sptr<WindowScene> scene3 = Utils::CreateWindowScene();
ASSERT_EQ(WMError::WM_ERROR_NULLPTR, scene3->GoForeground());
if (!SceneBoardJudgement::IsSceneBoardEnabled()) {
ASSERT_EQ(WMError::WM_OK, scene3->GoForeground());
} else {
ASSERT_EQ(WMError::WM_ERROR_NULLPTR, scene3->GoForeground());
}
DoSceneResource(scene1);
sptr<WindowScene> scene4 = Utils::CreateWindowScene();
if (!SceneBoardJudgement::IsSceneBoardEnabled()) {
ASSERT_EQ(WMError::WM_ERROR_NULLPTR, scene3->GoBackground());
ASSERT_EQ(WMError::WM_ERROR_NULLPTR, scene2->GoForeground());
ASSERT_EQ(WMError::WM_ERROR_NULLPTR, scene4->GoForeground());
ASSERT_EQ(WMError::WM_ERROR_NULLPTR, scene2->GoBackground());
ASSERT_EQ(WMError::WM_OK, scene3->GoBackground());
ASSERT_EQ(WMError::WM_OK, scene2->GoForeground());
ASSERT_EQ(WMError::WM_OK, scene4->GoForeground());
ASSERT_EQ(WMError::WM_OK, scene2->GoBackground());
} else {
ASSERT_NE(WMError::WM_OK, scene3->GoBackground());
ASSERT_NE(WMError::WM_OK, scene2->GoForeground());