Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Unified Diff: ui/app_list/views/apps_grid_view_unittest.cc

Issue 2595163002: Add origin() method on View and use it to simplify some callers. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/app_list/views/apps_grid_view_unittest.cc
diff --git a/ui/app_list/views/apps_grid_view_unittest.cc b/ui/app_list/views/apps_grid_view_unittest.cc
index ef92052d44eaca639b5982e90f9657a4c37f5339..1f7535ddf8758f1ac029031cf7bddfdef44c63c3 100644
--- a/ui/app_list/views/apps_grid_view_unittest.cc
+++ b/ui/app_list/views/apps_grid_view_unittest.cc
@@ -147,10 +147,10 @@ class AppsGridViewTest : public views::ViewsTestBase {
AppListItemView* view = GetItemViewForPoint(from);
DCHECK(view);
- gfx::Point translated_from = gfx::PointAtOffsetFromOrigin(
- from - view->bounds().origin());
- gfx::Point translated_to = gfx::PointAtOffsetFromOrigin(
- to - view->bounds().origin());
+ gfx::Point translated_from =
+ gfx::PointAtOffsetFromOrigin(from - view->origin());
+ gfx::Point translated_to =
+ gfx::PointAtOffsetFromOrigin(to - view->origin());
ui::MouseEvent pressed_event(ui::ET_MOUSE_PRESSED, translated_from, from,
ui::EventTimeForNow(), 0, 0);
@@ -441,7 +441,7 @@ TEST_F(AppsGridViewTest, MouseDragMaxItemsInFolderWithMovement) {
// Move onto the folder and end the drag.
to = GetItemTileRectAt(0, 1).CenterPoint();
gfx::Point translated_to =
- gfx::PointAtOffsetFromOrigin(to - dragged_view->bounds().origin());
+ gfx::PointAtOffsetFromOrigin(to - dragged_view->origin());
ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, translated_to, to,
ui::EventTimeForNow(), 0, 0);
apps_grid_view_->UpdateDragFromItem(AppsGridView::MOUSE, drag_event);

Powered by Google App Engine
This is Rietveld 408576698