| Index: ash/wm/panels/panel_layout_manager_unittest.cc
|
| diff --git a/ash/wm/panels/panel_layout_manager_unittest.cc b/ash/wm/panels/panel_layout_manager_unittest.cc
|
| index e43ecaa61424981e11a2ae79e05e67e874150417..195f14cac65c2f710308a839d74bad0b8c5bee9d 100644
|
| --- a/ash/wm/panels/panel_layout_manager_unittest.cc
|
| +++ b/ash/wm/panels/panel_layout_manager_unittest.cc
|
| @@ -804,51 +804,51 @@ TEST_F(PanelLayoutManagerTest, TouchHitTestPanel) {
|
|
|
| // Hit test outside the right edge with a bottom-aligned shelf.
|
| SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_BOTTOM);
|
| - gfx::Rect bounds(w->bounds());
|
| + gfx::RectF bounds(w->bounds());
|
| ui::TouchEvent touch(ui::ET_TOUCH_PRESSED,
|
| - gfx::Point(bounds.right() + 3, bounds.y() + 2),
|
| - 0, ui::EventTimeForNow());
|
| + bounds.top_right() + gfx::Vector2dF(3.f, 2.f), 0,
|
| + ui::EventTimeForNow());
|
| ui::EventTarget* target = targeter->FindTargetForEvent(root, &touch);
|
| EXPECT_EQ(w.get(), target);
|
|
|
| // Hit test outside the bottom edge with a bottom-aligned shelf.
|
| - touch.set_location(gfx::Point(bounds.x() + 6, bounds.bottom() + 5));
|
| + touch.set_location(bounds.bottom_left() + gfx::Vector2dF(6.f, 5.f));
|
| target = targeter->FindTargetForEvent(root, &touch);
|
| EXPECT_NE(w.get(), target);
|
|
|
| // Hit test outside the bottom edge with a right-aligned shelf.
|
| SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_RIGHT);
|
| - bounds = w->bounds();
|
| - touch.set_location(gfx::Point(bounds.x() + 6, bounds.bottom() + 5));
|
| + bounds = gfx::RectF(w->bounds());
|
| + touch.set_location(bounds.bottom_left() + gfx::Vector2dF(6.f, 5.f));
|
| target = targeter->FindTargetForEvent(root, &touch);
|
| EXPECT_EQ(w.get(), target);
|
|
|
| // Hit test outside the right edge with a right-aligned shelf.
|
| - touch.set_location(gfx::Point(bounds.right() + 3, bounds.y() + 2));
|
| + touch.set_location(bounds.top_right() + gfx::Vector2dF(3.f, 2.f));
|
| target = targeter->FindTargetForEvent(root, &touch);
|
| EXPECT_NE(w.get(), target);
|
|
|
| // Hit test outside the top edge with a left-aligned shelf.
|
| SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_LEFT);
|
| - bounds = w->bounds();
|
| - touch.set_location(gfx::Point(bounds.x() + 4, bounds.y() - 6));
|
| + bounds = gfx::RectF(w->bounds());
|
| + touch.set_location(bounds.origin() + gfx::Vector2dF(4.f, -6.f));
|
| target = targeter->FindTargetForEvent(root, &touch);
|
| EXPECT_EQ(w.get(), target);
|
|
|
| // Hit test outside the left edge with a left-aligned shelf.
|
| - touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5));
|
| + touch.set_location(bounds.origin() + gfx::Vector2dF(-1.f, 5.f));
|
| target = targeter->FindTargetForEvent(root, &touch);
|
| EXPECT_NE(w.get(), target);
|
|
|
| // Hit test outside the left edge with a top-aligned shelf.
|
| SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_TOP);
|
| - bounds = w->bounds();
|
| - touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5));
|
| + bounds = gfx::RectF(w->bounds());
|
| + touch.set_location(bounds.origin() + gfx::Vector2dF(-1.f, 5.f));
|
| target = targeter->FindTargetForEvent(root, &touch);
|
| EXPECT_EQ(w.get(), target);
|
|
|
| // Hit test outside the top edge with a top-aligned shelf.
|
| - touch.set_location(gfx::Point(bounds.x() + 4, bounds.y() - 6));
|
| + touch.set_location(bounds.origin() + gfx::Vector2dF(4.f, -6.f));
|
| target = targeter->FindTargetForEvent(root, &touch);
|
| EXPECT_NE(w.get(), target);
|
| }
|
|
|