mirror of
https://gitee.com/openharmony/msdp_device_status
synced 2024-11-23 23:50:23 +00:00
Fix UT
Signed-off-by: wuliangdong <wuliangdong1@huawei.com> Change-Id: I3414120da753f1099c67dff8cef75e09c6668c40
This commit is contained in:
parent
d4504d71fb
commit
398bcdee5c
@ -1683,16 +1683,18 @@ HWTEST_F(InteractionManagerTest, InteractionManagerTest_UpdateDragItemStyle, Tes
|
||||
ASSERT_EQ(ret, RET_OK);
|
||||
ret = InteractionManager::GetInstance()->SetDragWindowVisible(true);
|
||||
EXPECT_EQ(ret, RET_OK);
|
||||
int32_t stopX = 600;
|
||||
int32_t stopY = 50;
|
||||
SimulateMoveEvent({ DRAG_SRC_X, DRAG_SRC_Y }, { stopX, stopY },
|
||||
std::pair<int32_t, int32_t> enterPos { 500, 50 };
|
||||
std::pair<int32_t, int32_t> leavePos { 500, 200 };
|
||||
SimulateMoveEvent({ DRAG_SRC_X, DRAG_SRC_Y }, { enterPos.first, enterPos.second },
|
||||
MMI::PointerEvent::SOURCE_TYPE_MOUSE, MOUSE_POINTER_ID, true);
|
||||
ret = InteractionManager::GetInstance()->UpdateDragItemStyle({ FOREGROUND_COLOR_IN, RADIUS_IN, ALPHA_IN });
|
||||
EXPECT_EQ(ret, RET_OK);
|
||||
SimulateMoveEvent({ stopX, stopY }, { DRAG_DST_X, DRAG_DST_Y },
|
||||
SimulateMoveEvent({ enterPos.first, enterPos.second }, { leavePos.first, leavePos.second },
|
||||
MMI::PointerEvent::SOURCE_TYPE_MOUSE, MOUSE_POINTER_ID, true);
|
||||
ret = InteractionManager::GetInstance()->UpdateDragItemStyle({ FOREGROUND_COLOR_OUT, RADIUS_OUT, ALPHA_OUT });
|
||||
EXPECT_EQ(ret, RET_OK);
|
||||
SimulateMoveEvent({ leavePos.first, leavePos.second }, { DRAG_DST_X, DRAG_DST_Y },
|
||||
MMI::PointerEvent::SOURCE_TYPE_MOUSE, MOUSE_POINTER_ID, true);
|
||||
DragDropResult dropResult { DragResult::DRAG_SUCCESS, HAS_CUSTOM_ANIMATION, WINDOW_ID };
|
||||
InteractionManager::GetInstance()->StopDrag(dropResult);
|
||||
ASSERT_TRUE(futureFlag.wait_for(std::chrono::milliseconds(PROMISE_WAIT_SPAN_MS)) !=
|
||||
|
Loading…
Reference in New Issue
Block a user