| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 if (tile->visible()) | 55 if (tile->visible()) |
| 56 count++; | 56 count++; |
| 57 } | 57 } |
| 58 return count; | 58 return count; |
| 59 } | 59 } |
| 60 | 60 |
| 61 void SimulateClick(views::View* view) { | 61 void SimulateClick(views::View* view) { |
| 62 gfx::Point center = view->GetLocalBounds().CenterPoint(); | 62 gfx::Point center = view->GetLocalBounds().CenterPoint(); |
| 63 view->OnMousePressed(ui::MouseEvent( | 63 view->OnMousePressed(ui::MouseEvent( |
| 64 ui::ET_MOUSE_PRESSED, center, center, ui::EventTimeForNow(), | 64 ui::ET_MOUSE_PRESSED, center, center, ui::EventTimeForNow(), |
| 65 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); | 65 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON, |
| 66 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE))); |
| 66 view->OnMouseReleased(ui::MouseEvent( | 67 view->OnMouseReleased(ui::MouseEvent( |
| 67 ui::ET_MOUSE_RELEASED, center, center, ui::EventTimeForNow(), | 68 ui::ET_MOUSE_RELEASED, center, center, ui::EventTimeForNow(), |
| 68 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); | 69 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON, |
| 70 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE))); |
| 69 } | 71 } |
| 70 | 72 |
| 71 // Choose a set that is 3 regular app list pages and 2 landscape app list pages. | 73 // Choose a set that is 3 regular app list pages and 2 landscape app list pages. |
| 72 const int kInitialItems = 34; | 74 const int kInitialItems = 34; |
| 73 | 75 |
| 74 class TestStartPageSearchResult : public TestSearchResult { | 76 class TestStartPageSearchResult : public TestSearchResult { |
| 75 public: | 77 public: |
| 76 TestStartPageSearchResult() { set_display_type(DISPLAY_RECOMMENDATION); } | 78 TestStartPageSearchResult() { set_display_type(DISPLAY_RECOMMENDATION); } |
| 77 ~TestStartPageSearchResult() override {} | 79 ~TestStartPageSearchResult() override {} |
| 78 | 80 |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 TEST_F(AppListViewTestAura, AppListOverlayTest) { | 750 TEST_F(AppListViewTestAura, AppListOverlayTest) { |
| 749 EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest()); | 751 EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest()); |
| 750 } | 752 } |
| 751 | 753 |
| 752 TEST_F(AppListViewTestDesktop, AppListOverlayTest) { | 754 TEST_F(AppListViewTestDesktop, AppListOverlayTest) { |
| 753 EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest()); | 755 EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest()); |
| 754 } | 756 } |
| 755 | 757 |
| 756 } // namespace test | 758 } // namespace test |
| 757 } // namespace app_list | 759 } // namespace app_list |
| OLD | NEW |