| OLD | NEW |
| 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/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 ui::MouseEvent pressed_event(ui::ET_MOUSE_PRESSED, | 164 ui::MouseEvent pressed_event(ui::ET_MOUSE_PRESSED, |
| 165 translated_from, from, 0, 0); | 165 translated_from, from, 0, 0); |
| 166 apps_grid_view_->InitiateDrag(view, pointer, pressed_event); | 166 apps_grid_view_->InitiateDrag(view, pointer, pressed_event); |
| 167 | 167 |
| 168 ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, | 168 ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, |
| 169 translated_to, to, 0, 0); | 169 translated_to, to, 0, 0); |
| 170 apps_grid_view_->UpdateDragFromItem(pointer, drag_event); | 170 apps_grid_view_->UpdateDragFromItem(pointer, drag_event); |
| 171 } | 171 } |
| 172 | 172 |
| 173 void SimulateKeyPress(ui::KeyboardCode key_code) { | 173 void SimulateKeyPress(ui::KeyboardCode key_code) { |
| 174 ui::KeyEvent key_event(ui::ET_KEY_PRESSED, key_code, 0, false); | 174 ui::KeyEvent key_event(ui::ET_KEY_PRESSED, key_code, ui::EF_NONE); |
| 175 apps_grid_view_->OnKeyPressed(key_event); | 175 apps_grid_view_->OnKeyPressed(key_event); |
| 176 } | 176 } |
| 177 | 177 |
| 178 scoped_ptr<AppListTestModel> model_; | 178 scoped_ptr<AppListTestModel> model_; |
| 179 scoped_ptr<AppsGridView> apps_grid_view_; | 179 scoped_ptr<AppsGridView> apps_grid_view_; |
| 180 scoped_ptr<AppsGridViewTestApi> test_api_; | 180 scoped_ptr<AppsGridViewTestApi> test_api_; |
| 181 | 181 |
| 182 private: | 182 private: |
| 183 DISALLOW_COPY_AND_ASSIGN(AppsGridViewTest); | 183 DISALLOW_COPY_AND_ASSIGN(AppsGridViewTest); |
| 184 }; | 184 }; |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 AppListItemView* item_view = GetItemViewAt(0); | 701 AppListItemView* item_view = GetItemViewAt(0); |
| 702 ASSERT_TRUE(item_view); | 702 ASSERT_TRUE(item_view); |
| 703 const views::Label* title_label = item_view->title(); | 703 const views::Label* title_label = item_view->title(); |
| 704 EXPECT_FALSE(title_label->GetTooltipText( | 704 EXPECT_FALSE(title_label->GetTooltipText( |
| 705 title_label->bounds().CenterPoint(), &actual_tooltip)); | 705 title_label->bounds().CenterPoint(), &actual_tooltip)); |
| 706 EXPECT_EQ(title, base::UTF16ToUTF8(title_label->text())); | 706 EXPECT_EQ(title, base::UTF16ToUTF8(title_label->text())); |
| 707 } | 707 } |
| 708 | 708 |
| 709 } // namespace test | 709 } // namespace test |
| 710 } // namespace app_list | 710 } // namespace app_list |
| OLD | NEW |