| Index: ash/shelf/shelf_view_unittest.cc
|
| diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
|
| index a74979adc60c7587c4f460140e11444b65644860..902b747250692c0e7236c476dcd1511ddcc5a86b 100644
|
| --- a/ash/shelf/shelf_view_unittest.cc
|
| +++ b/ash/shelf/shelf_view_unittest.cc
|
| @@ -443,9 +443,10 @@ class ShelfViewTest : public AshTestBase {
|
| int button_index) {
|
| ShelfButtonHost* button_host = shelf_view_;
|
| ShelfButton* button = test_api_->GetButton(button_index);
|
| - ui::MouseEvent click_event(ui::ET_MOUSE_PRESSED, gfx::Point(),
|
| - button->GetBoundsInScreen().origin(),
|
| - ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent click_event(
|
| + ui::ET_MOUSE_PRESSED, gfx::Point(),
|
| + button->GetBoundsInScreen().origin(), ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| button_host->PointerPressedOnButton(button, pointer, click_event);
|
| return button;
|
| }
|
| @@ -455,9 +456,10 @@ class ShelfViewTest : public AshTestBase {
|
| ShelfButtonHost* button_host = shelf_view_;
|
| ShelfButton* button =
|
| SimulateButtonPressed(ShelfButtonHost::MOUSE, button_index);
|
| - ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED, gfx::Point(),
|
| - button->GetBoundsInScreen().origin(),
|
| - ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent release_event(
|
| + ui::ET_MOUSE_RELEASED, gfx::Point(),
|
| + button->GetBoundsInScreen().origin(), ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| test_api_->ButtonPressed(button, release_event);
|
| button_host->PointerReleasedOnButton(button, ShelfButtonHost::MOUSE, false);
|
| }
|
| @@ -467,10 +469,11 @@ class ShelfViewTest : public AshTestBase {
|
| ShelfButtonHost* button_host = shelf_view_;
|
| ShelfButton* button =
|
| SimulateButtonPressed(ShelfButtonHost::MOUSE, button_index);
|
| - ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED, gfx::Point(),
|
| - button->GetBoundsInScreen().origin(),
|
| - ui::EventTimeForNow(), ui::EF_IS_DOUBLE_CLICK,
|
| - 0);
|
| + ui::MouseEvent release_event(
|
| + ui::ET_MOUSE_RELEASED, gfx::Point(),
|
| + button->GetBoundsInScreen().origin(), ui::EventTimeForNow(),
|
| + ui::EF_IS_DOUBLE_CLICK, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| test_api_->ButtonPressed(button, release_event);
|
| button_host->PointerReleasedOnButton(button, ShelfButtonHost::MOUSE, false);
|
| }
|
| @@ -486,7 +489,8 @@ class ShelfViewTest : public AshTestBase {
|
| ui::MouseEvent drag_event(
|
| ui::ET_MOUSE_DRAGGED, gfx::Point(destination->x() - button->x(),
|
| destination->y() - button->y()),
|
| - destination->GetBoundsInScreen().origin(), ui::EventTimeForNow(), 0, 0);
|
| + destination->GetBoundsInScreen().origin(), ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| button_host->PointerDraggedOnButton(button, pointer, drag_event);
|
| return button;
|
| }
|
| @@ -1194,27 +1198,31 @@ TEST_F(ShelfViewTest, ClickAndMoveSlightly) {
|
| gfx::Point press_location_in_screen =
|
| button->GetBoundsInScreen().origin() + press_offset;
|
|
|
| - ui::MouseEvent click_event(ui::ET_MOUSE_PRESSED, press_location,
|
| - press_location_in_screen, ui::EventTimeForNow(),
|
| - ui::EF_LEFT_MOUSE_BUTTON, 0);
|
| + ui::MouseEvent click_event(
|
| + ui::ET_MOUSE_PRESSED, press_location, press_location_in_screen,
|
| + ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| button->OnMousePressed(click_event);
|
|
|
| ui::MouseEvent drag_event1(
|
| ui::ET_MOUSE_DRAGGED, press_location + gfx::Vector2d(0, 1),
|
| press_location_in_screen + gfx::Vector2d(0, 1), ui::EventTimeForNow(),
|
| - ui::EF_LEFT_MOUSE_BUTTON, 0);
|
| + ui::EF_LEFT_MOUSE_BUTTON, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| button->OnMouseDragged(drag_event1);
|
|
|
| ui::MouseEvent drag_event2(
|
| ui::ET_MOUSE_DRAGGED, press_location + gfx::Vector2d(-1, 0),
|
| press_location_in_screen + gfx::Vector2d(-1, 0), ui::EventTimeForNow(),
|
| - ui::EF_LEFT_MOUSE_BUTTON, 0);
|
| + ui::EF_LEFT_MOUSE_BUTTON, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| button->OnMouseDragged(drag_event2);
|
|
|
| ui::MouseEvent release_event(
|
| ui::ET_MOUSE_RELEASED, press_location + gfx::Vector2d(-1, 0),
|
| press_location_in_screen + gfx::Vector2d(-1, 0), ui::EventTimeForNow(),
|
| - ui::EF_LEFT_MOUSE_BUTTON, 0);
|
| + ui::EF_LEFT_MOUSE_BUTTON, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| button->OnMouseReleased(release_event);
|
|
|
| EXPECT_TRUE(selection_tracker->WasSelected());
|
|
|