!7518 window_effect_test crash

Merge pull request !7518 from yangningning/master
This commit is contained in:
openharmony_ci 2024-07-24 10:57:09 +00:00 committed by Gitee
commit 4a3f5206e5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -197,28 +197,11 @@ 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>(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);
WindowAccessibilityController::GetInstance().SetAnchorAndScale(0, 0, 2);
sleep(1);
WindowAccessibilityController::GetInstance().SetAnchorOffset(-100, -100);
ASSERT_EQ(WMError::WM_OK, window->Destroy());
}
} // namespace
} // namespace Rosen
} // namespace OHOS