| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/app_list_view.h" | 5 #include "ui/app_list/views/app_list_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 if (tile->visible()) | 57 if (tile->visible()) |
| 58 count++; | 58 count++; |
| 59 } | 59 } |
| 60 return count; | 60 return count; |
| 61 } | 61 } |
| 62 | 62 |
| 63 void SimulateClick(views::View* view) { | 63 void SimulateClick(views::View* view) { |
| 64 gfx::Point center = view->GetLocalBounds().CenterPoint(); | 64 gfx::Point center = view->GetLocalBounds().CenterPoint(); |
| 65 view->OnMousePressed(ui::MouseEvent( | 65 view->OnMousePressed(ui::MouseEvent( |
| 66 ui::ET_MOUSE_PRESSED, center, center, ui::EventTimeForNow(), | 66 ui::ET_MOUSE_PRESSED, center, center, ui::EventTimeForNow(), |
| 67 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); | 67 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON, |
| 68 ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE))); |
| 68 view->OnMouseReleased(ui::MouseEvent( | 69 view->OnMouseReleased(ui::MouseEvent( |
| 69 ui::ET_MOUSE_RELEASED, center, center, ui::EventTimeForNow(), | 70 ui::ET_MOUSE_RELEASED, center, center, ui::EventTimeForNow(), |
| 70 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); | 71 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON, |
| 72 ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE))); |
| 71 } | 73 } |
| 72 | 74 |
| 73 // Choose a set that is 3 regular app list pages and 2 landscape app list pages. | 75 // Choose a set that is 3 regular app list pages and 2 landscape app list pages. |
| 74 const int kInitialItems = 34; | 76 const int kInitialItems = 34; |
| 75 | 77 |
| 76 class TestStartPageSearchResult : public TestSearchResult { | 78 class TestStartPageSearchResult : public TestSearchResult { |
| 77 public: | 79 public: |
| 78 TestStartPageSearchResult() { set_display_type(DISPLAY_RECOMMENDATION); } | 80 TestStartPageSearchResult() { set_display_type(DISPLAY_RECOMMENDATION); } |
| 79 ~TestStartPageSearchResult() override {} | 81 ~TestStartPageSearchResult() override {} |
| 80 | 82 |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 AppListViewTestAura, | 839 AppListViewTestAura, |
| 838 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 840 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
| 839 #endif | 841 #endif |
| 840 | 842 |
| 841 INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance, | 843 INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance, |
| 842 AppListViewTestDesktop, | 844 AppListViewTestDesktop, |
| 843 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 845 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
| 844 | 846 |
| 845 } // namespace test | 847 } // namespace test |
| 846 } // namespace app_list | 848 } // namespace app_list |
| OLD | NEW |