| Index: ui/wm/core/compound_event_filter_unittest.cc
|
| diff --git a/ui/wm/core/compound_event_filter_unittest.cc b/ui/wm/core/compound_event_filter_unittest.cc
|
| index 4ffdd26fa44a9e5f7af34960c40e1a6bd2c85c13..038238a428956eae157bdbce79c22a63aaf1e903 100644
|
| --- a/ui/wm/core/compound_event_filter_unittest.cc
|
| +++ b/ui/wm/core/compound_event_filter_unittest.cc
|
| @@ -67,21 +67,27 @@ TEST_F(CompoundEventFilterTest, CursorVisibilityChange) {
|
| EXPECT_FALSE(cursor_client.IsCursorVisible());
|
|
|
| // Synthesized mouse event should not show the cursor.
|
| - ui::MouseEvent enter(ui::ET_MOUSE_ENTERED, gfx::Point(10, 10),
|
| - gfx::Point(10, 10), ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent enter(
|
| + ui::ET_MOUSE_ENTERED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| + ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| enter.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
|
| DispatchEventUsingWindowDispatcher(&enter);
|
| EXPECT_FALSE(cursor_client.IsCursorVisible());
|
|
|
| - ui::MouseEvent move(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
|
| - gfx::Point(10, 10), ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent move(
|
| + ui::ET_MOUSE_MOVED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| + ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| move.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
|
| DispatchEventUsingWindowDispatcher(&move);
|
| EXPECT_FALSE(cursor_client.IsCursorVisible());
|
|
|
| // A real mouse event should show the cursor.
|
| - ui::MouseEvent real_move(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
|
| - gfx::Point(10, 10), ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent real_move(
|
| + ui::ET_MOUSE_MOVED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| + ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| DispatchEventUsingWindowDispatcher(&real_move);
|
| EXPECT_TRUE(cursor_client.IsCursorVisible());
|
|
|
| @@ -98,8 +104,10 @@ TEST_F(CompoundEventFilterTest, CursorVisibilityChange) {
|
| EXPECT_FALSE(cursor_client.IsCursorVisible());
|
|
|
| // Mouse synthesized exit event should not show the cursor.
|
| - ui::MouseEvent exit(ui::ET_MOUSE_EXITED, gfx::Point(10, 10),
|
| - gfx::Point(10, 10), ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent exit(
|
| + ui::ET_MOUSE_EXITED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| + ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| exit.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
|
| DispatchEventUsingWindowDispatcher(&exit);
|
| EXPECT_FALSE(cursor_client.IsCursorVisible());
|
| @@ -122,8 +130,10 @@ TEST_F(CompoundEventFilterTest, TouchHidesCursor) {
|
|
|
| aura::test::TestCursorClient cursor_client(root_window());
|
|
|
| - ui::MouseEvent mouse0(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
|
| - gfx::Point(10, 10), ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent mouse0(
|
| + ui::ET_MOUSE_MOVED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| + ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| DispatchEventUsingWindowDispatcher(&mouse0);
|
| EXPECT_TRUE(cursor_client.IsMouseEventsEnabled());
|
|
|
| @@ -143,8 +153,10 @@ TEST_F(CompoundEventFilterTest, TouchHidesCursor) {
|
| DispatchEventUsingWindowDispatcher(&release);
|
| EXPECT_FALSE(cursor_client.IsMouseEventsEnabled());
|
|
|
| - ui::MouseEvent mouse1(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
|
| - gfx::Point(10, 10), ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent mouse1(
|
| + ui::ET_MOUSE_MOVED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| + ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| // Move the cursor again. The cursor should be visible.
|
| DispatchEventUsingWindowDispatcher(&mouse1);
|
| EXPECT_TRUE(cursor_client.IsMouseEventsEnabled());
|
| @@ -230,8 +242,10 @@ TEST_F(CompoundEventFilterTest, DontShowCursorOnMouseMovesFromTouch) {
|
| cursor_client.DisableMouseEvents();
|
| EXPECT_FALSE(cursor_client.IsMouseEventsEnabled());
|
|
|
| - ui::MouseEvent mouse0(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
|
| - gfx::Point(10, 10), ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent mouse0(
|
| + ui::ET_MOUSE_MOVED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| + ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| mouse0.set_flags(mouse0.flags() | ui::EF_FROM_TOUCH);
|
|
|
| DispatchEventUsingWindowDispatcher(&mouse0);
|
|
|