window_effect_test crash

Signed-off-by: yangningning <yangningning8@huawei.com>
Change-Id: Ib0b5dba468447b33ab98e9e381fe3b2ec2689e25
This commit is contained in:
yangningning 2024-07-19 08:59:47 +08:00
parent 3d8df20a9f
commit 80599f9518

View File

@ -198,27 +198,14 @@ HWTEST_F(WindowEffectTest, WindowEffect07, Function | MediumTest | Level3)
ASSERT_EQ(WMError::WM_ERROR_INVALID_PARAM, window->SetBackdropBlurStyle(static_cast<WindowBlurStyle>(-1))); ASSERT_EQ(WMError::WM_ERROR_INVALID_PARAM, window->SetBackdropBlurStyle(static_cast<WindowBlurStyle>(-1)));
ASSERT_EQ(WMError::WM_ERROR_INVALID_PARAM, window->SetBackdropBlurStyle(static_cast<WindowBlurStyle>(5))); ASSERT_EQ(WMError::WM_ERROR_INVALID_PARAM, window->SetBackdropBlurStyle(static_cast<WindowBlurStyle>(5)));
ASSERT_EQ(WMError::WM_OK, window->Destroy());
}
/**
* @tc.name: WindowEffect08
* @tc.desc: Set window backdrop blur style
* @tc.type: FUNC
*/
HWTEST_F(WindowEffectTest, WindowEffect08, Function | MediumTest | Level3)
{
const sptr<Window> &window = Utils::CreateTestWindow(windowInfo_);
ASSERT_NE(nullptr, window);
WindowAccessibilityController::GetInstance().OffWindowZoom();
sleep(1); sleep(1);
WindowAccessibilityController::GetInstance().SetAnchorAndScale(0, 0, 2); WindowAccessibilityController::GetInstance().SetAnchorAndScale(0, 0, 2);
sleep(1); sleep(1);
WindowAccessibilityController::GetInstance().SetAnchorOffset(-100, -100);
ASSERT_EQ(WMError::WM_OK, window->Destroy()); ASSERT_EQ(WMError::WM_OK, window->Destroy());
} }
} // namespace } // namespace
} // namespace Rosen } // namespace Rosen
} // namespace OHOS } // namespace OHOS