mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-27 09:00:55 +00:00
fix
Signed-off-by: z30042987 <zhouminghui8@huawei.com>
This commit is contained in:
parent
5536969ef0
commit
578a7369ee
@ -410,7 +410,7 @@ HWTEST_F(DisplayPowerTest, window_life_cycle_001, Function | MediumTest | Level2
|
||||
{
|
||||
sptr<WindowOption> option = new WindowOption();
|
||||
sptr<Window> window = Window::Create("window1", option, nullptr);
|
||||
if(window==nullptr){
|
||||
if(window==nullptr) {
|
||||
return;
|
||||
}
|
||||
EXPECT_EQ(WMError::WM_OK, window->Show());
|
||||
|
@ -426,11 +426,10 @@ HWTEST_F(WindowImmersiveTest, GetAvoidAreaByTypeTest01, Function | MediumTest |
|
||||
HWTEST_F(WindowImmersiveTest, DockWindowTest01, Function | MediumTest | Level3)
|
||||
{
|
||||
const sptr<Window>& dockWindow = Utils::CreateDockWindow();
|
||||
if(dockWindow==nullptr) {
|
||||
if (dockWindow == nullptr) {
|
||||
return;
|
||||
}
|
||||
ASSERT_EQ(WMError::WM_OK, dockWindow->Show());
|
||||
|
||||
const sptr<Window>& window = Utils::CreateTestWindow(fullScreenAppinfo_);
|
||||
|
||||
usleep(WAIT_ASYNC_US);
|
||||
|
@ -75,7 +75,7 @@ HWTEST_F(WindowInputTest, SetTouchHotAreas01, Function | MediumTest | Level3)
|
||||
{
|
||||
fullScreenWindow_.name = "window_hot_areas.1";
|
||||
const sptr<Window>& window = Utils::CreateTestWindow(fullScreenWindow_);
|
||||
if(window==nullptr) {
|
||||
if (window == nullptr) {
|
||||
return;
|
||||
}
|
||||
ASSERT_EQ(WMError::WM_OK, window->Show());
|
||||
@ -127,7 +127,7 @@ HWTEST_F(WindowInputTest, SetTouchHotAreas02, Function | MediumTest | Level3)
|
||||
{
|
||||
fullScreenWindow_.name = "window_hot_areas.2";
|
||||
const sptr<Window>& window = Utils::CreateTestWindow(fullScreenWindow_);
|
||||
if(window==nullptr) {
|
||||
if (window == nullptr) {
|
||||
return;
|
||||
}
|
||||
ASSERT_EQ(WMError::WM_OK, window->Show());
|
||||
|
@ -83,7 +83,7 @@ namespace {
|
||||
HWTEST_F(WindowModeSupportInfoTest, WindowModeSupportInfo01, Function | MediumTest | Level3)
|
||||
{
|
||||
const sptr<Window>& window = Utils::CreateTestWindow(fullAppInfo_1_);
|
||||
if(window==nullptr){
|
||||
if (window == nullptr) {
|
||||
return;
|
||||
}
|
||||
window->SetRequestModeSupportInfo(WindowModeSupport::WINDOW_MODE_SUPPORT_FULLSCREEN);
|
||||
@ -99,7 +99,7 @@ HWTEST_F(WindowModeSupportInfoTest, WindowModeSupportInfo01, Function | MediumTe
|
||||
HWTEST_F(WindowModeSupportInfoTest, WindowModeSupportInfo02, Function | MediumTest | Level3)
|
||||
{
|
||||
const sptr<Window>& window = Utils::CreateTestWindow(fullAppInfo_1_);
|
||||
if(window==nullptr){
|
||||
if (window == nullptr) {
|
||||
return;
|
||||
}
|
||||
window->SetRequestModeSupportInfo(WindowModeSupport::WINDOW_MODE_SUPPORT_FULLSCREEN);
|
||||
@ -127,7 +127,7 @@ HWTEST_F(WindowModeSupportInfoTest, WindowModeSupportInfo02, Function | MediumTe
|
||||
HWTEST_F(WindowModeSupportInfoTest, WindowModeSupportInfo03, Function | MediumTest | Level3)
|
||||
{
|
||||
const sptr<Window>& window = Utils::CreateTestWindow(fullAppInfo_1_);
|
||||
if(window==nullptr){
|
||||
if (window == nullptr) {
|
||||
return;
|
||||
}
|
||||
window->SetRequestModeSupportInfo(WindowModeSupport::WINDOW_MODE_SUPPORT_FULLSCREEN |
|
||||
@ -159,7 +159,7 @@ HWTEST_F(WindowModeSupportInfoTest, WindowModeSupportInfo03, Function | MediumTe
|
||||
HWTEST_F(WindowModeSupportInfoTest, WindowModeSupportInfo04, Function | MediumTest | Level3)
|
||||
{
|
||||
const sptr<Window>& window = Utils::CreateTestWindow(fullAppInfo_1_);
|
||||
if(window==nullptr){
|
||||
if (window == nullptr) {
|
||||
return;
|
||||
}
|
||||
window->SetRequestModeSupportInfo(WindowModeSupport::WINDOW_MODE_SUPPORT_FLOATING |
|
||||
@ -178,7 +178,7 @@ HWTEST_F(WindowModeSupportInfoTest, WindowModeSupportInfo04, Function | MediumTe
|
||||
HWTEST_F(WindowModeSupportInfoTest, WindowModeSupportInfo05, Function | MediumTest | Level3)
|
||||
{
|
||||
const sptr<Window>& window1 = Utils::CreateTestWindow(fullAppInfo_1_);
|
||||
if(window1==nullptr){
|
||||
if (window1 == nullptr) {
|
||||
return;
|
||||
}
|
||||
window1->SetRequestModeSupportInfo(WindowModeSupport::WINDOW_MODE_SUPPORT_FULLSCREEN);
|
||||
@ -204,7 +204,7 @@ HWTEST_F(WindowModeSupportInfoTest, WindowModeSupportInfo05, Function | MediumTe
|
||||
HWTEST_F(WindowModeSupportInfoTest, WindowModeSupportInfo06, Function | MediumTest | Level3)
|
||||
{
|
||||
const sptr<Window>& window = Utils::CreateTestWindow(fullAppInfo_1_);
|
||||
if(window==nullptr) {
|
||||
if (window == nullptr) {
|
||||
return;
|
||||
}
|
||||
window->SetRequestModeSupportInfo(WindowModeSupport::WINDOW_MODE_SUPPORT_FULLSCREEN);
|
||||
|
@ -164,7 +164,6 @@ HWTEST_F(SceneSessionTest, GetGlobalMaximizeMode01, Function | SmallTest | Level
|
||||
EXPECT_NE(specificCallback_, nullptr);
|
||||
|
||||
sptr<SceneSession> scensession;
|
||||
|
||||
scensession = new (std::nothrow) SceneSession(info, nullptr);
|
||||
EXPECT_NE(scensession, nullptr);
|
||||
scensession->isActive_ = true;
|
||||
@ -239,15 +238,15 @@ HWTEST_F(SceneSessionTest, GetTouchHotAreas01, Function | SmallTest | Level2)
|
||||
sptr<SceneSession> scensession;
|
||||
scensession = new (std::nothrow) SceneSession(info, nullptr);
|
||||
EXPECT_NE(scensession, nullptr);
|
||||
Rect windowRect = { 1, 1, 1, 1 };
|
||||
Rect windowRect = {1, 1, 1, 1};
|
||||
std::vector<Rect> rects;
|
||||
uint32_t hotAreasNum = 10;
|
||||
uint32_t hotAreaWidth = windowRect.width_ / hotAreasNum;
|
||||
uint32_t hotAreaHeight = windowRect.height_ / hotAreasNum;
|
||||
for (uint32_t i = 0; i < hotAreasNum; ++i) {
|
||||
rects.emplace_back(Rect{ hotAreaWidth * i, hotAreaHeight * i, hotAreaWidth, hotAreaHeight });
|
||||
rects.emplace_back(Rect{hotAreaWidth * i, hotAreaHeight * i, hotAreaWidth, hotAreaHeight});
|
||||
}
|
||||
sptr<WindowSessionProperty> property = new(std::nothrow) WindowSessionProperty();
|
||||
sptr<WindowSessionProperty> property = new (std::nothrow) WindowSessionProperty();
|
||||
|
||||
ASSERT_NE(nullptr, property);
|
||||
property->SetTouchHotAreas(rects);
|
||||
@ -271,8 +270,8 @@ HWTEST_F(SceneSessionTest, SetTurnScreenOn01, Function | SmallTest | Level2)
|
||||
sptr<SceneSession> scensession;
|
||||
scensession = new (std::nothrow) SceneSession(info, nullptr);
|
||||
EXPECT_NE(scensession, nullptr);
|
||||
ASSERT_EQ(WSError::WS_ERROR_NULLPTR, scensession->NotifyTouchOutside() );
|
||||
sptr<SessionStageMocker> mockSessionStage = new(std::nothrow) SessionStageMocker();
|
||||
ASSERT_EQ(WSError::WS_ERROR_NULLPTR, scensession->NotifyTouchOutside());
|
||||
sptr<SessionStageMocker> mockSessionStage = new (std::nothrow) SessionStageMocker();
|
||||
ASSERT_NE(mockSessionStage, nullptr);
|
||||
ASSERT_EQ(WSError::WS_OK, scensession->SetTurnScreenOn(false));
|
||||
ASSERT_EQ(false, scensession->IsTurnScreenOn());
|
||||
@ -297,8 +296,8 @@ HWTEST_F(SceneSessionTest, UpdateWindowAnimationFlag01, Function | SmallTest | L
|
||||
sptr<SceneSession> scensession;
|
||||
scensession = new (std::nothrow) SceneSession(info, nullptr);
|
||||
EXPECT_NE(scensession, nullptr);
|
||||
ASSERT_EQ(WSError::WS_ERROR_NULLPTR, scensession->NotifyTouchOutside() );
|
||||
sptr<SessionStageMocker> mockSessionStage = new(std::nothrow) SessionStageMocker();
|
||||
ASSERT_EQ(WSError::WS_ERROR_NULLPTR, scensession->NotifyTouchOutside());
|
||||
sptr<SessionStageMocker> mockSessionStage = new (std::nothrow) SessionStageMocker();
|
||||
ASSERT_NE(mockSessionStage, nullptr);
|
||||
ASSERT_EQ(WSError::WS_OK, scensession->UpdateWindowAnimationFlag(false));
|
||||
}
|
||||
|
@ -1528,10 +1528,10 @@ HWTEST_F(WindowSceneSessionImplTest, UpdateConfigurationForAll01, Function | Sma
|
||||
option->SetWindowType(WindowType::SYSTEM_WINDOW_BASE);
|
||||
sptr<WindowSceneSessionImpl> windowscenesession = new (std::nothrow) WindowSceneSessionImpl(option);
|
||||
ASSERT_NE(nullptr, windowscenesession);
|
||||
int ret=0;
|
||||
int ret = 0;
|
||||
std::shared_ptr<AppExecFwk::Configuration> configuration;
|
||||
windowscenesession->UpdateConfigurationForAll(configuration);
|
||||
ASSERT_EQ(ret,0);
|
||||
ASSERT_EQ(ret, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user