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

Side by Side Diff: ui/app_list/views/apps_grid_view_unittest.cc

Issue 101573006: Changes MouseEvent constructor to take changed_button_flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test; needs updated expectations as mouse entered wasnt sent before because of env::mouse_butto… Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/app_list/views/apps_grid_view.h" 5 #include "ui/app_list/views/apps_grid_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 const gfx::Point& to) { 148 const gfx::Point& to) {
149 AppListItemView* view = GetItemViewForPoint(from); 149 AppListItemView* view = GetItemViewForPoint(from);
150 DCHECK(view); 150 DCHECK(view);
151 151
152 gfx::Point translated_from = gfx::PointAtOffsetFromOrigin( 152 gfx::Point translated_from = gfx::PointAtOffsetFromOrigin(
153 from - view->bounds().origin()); 153 from - view->bounds().origin());
154 gfx::Point translated_to = gfx::PointAtOffsetFromOrigin( 154 gfx::Point translated_to = gfx::PointAtOffsetFromOrigin(
155 to - view->bounds().origin()); 155 to - view->bounds().origin());
156 156
157 ui::MouseEvent pressed_event(ui::ET_MOUSE_PRESSED, 157 ui::MouseEvent pressed_event(ui::ET_MOUSE_PRESSED,
158 translated_from, from, 0); 158 translated_from, from, 0, 0);
159 apps_grid_view_->InitiateDrag(view, pointer, pressed_event); 159 apps_grid_view_->InitiateDrag(view, pointer, pressed_event);
160 160
161 ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, 161 ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED,
162 translated_to, to, 0); 162 translated_to, to, 0, 0);
163 apps_grid_view_->UpdateDragFromItem(pointer, drag_event); 163 apps_grid_view_->UpdateDragFromItem(pointer, drag_event);
164 } 164 }
165 165
166 void SimulateKeyPress(ui::KeyboardCode key_code) { 166 void SimulateKeyPress(ui::KeyboardCode key_code) {
167 ui::KeyEvent key_event(ui::ET_KEY_PRESSED, key_code, 0, false); 167 ui::KeyEvent key_event(ui::ET_KEY_PRESSED, key_code, 0, false);
168 apps_grid_view_->OnKeyPressed(key_event); 168 apps_grid_view_->OnKeyPressed(key_event);
169 } 169 }
170 170
171 scoped_ptr<AppListTestModel> model_; 171 scoped_ptr<AppListTestModel> model_;
172 scoped_ptr<PaginationModel> pagination_model_; 172 scoped_ptr<PaginationModel> pagination_model_;
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 AppListItemView* item_view = GetItemViewAt(0); 455 AppListItemView* item_view = GetItemViewAt(0);
456 ASSERT_TRUE(item_view); 456 ASSERT_TRUE(item_view);
457 const views::Label* title_label = item_view->title(); 457 const views::Label* title_label = item_view->title();
458 EXPECT_FALSE(title_label->GetTooltipText( 458 EXPECT_FALSE(title_label->GetTooltipText(
459 title_label->bounds().CenterPoint(), &actual_tooltip)); 459 title_label->bounds().CenterPoint(), &actual_tooltip));
460 EXPECT_EQ(title, UTF16ToUTF8(title_label->text())); 460 EXPECT_EQ(title, UTF16ToUTF8(title_label->text()));
461 } 461 }
462 462
463 } // namespace test 463 } // namespace test
464 } // namespace app_list 464 } // namespace app_list
OLDNEW
« no previous file with comments | « content/browser/web_contents/aura/window_slider_unittest.cc ('k') | ui/aura/remote_root_window_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698