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 "ash/launcher/launcher_tooltip_manager.h" | 5 #include "ash/launcher/launcher_tooltip_manager.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "ash/wm/shelf_layout_manager.h" | 10 #include "ash/wm/shelf_layout_manager.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 class LauncherTooltipManagerTest : public AshTestBase { | 34 class LauncherTooltipManagerTest : public AshTestBase { |
35 public: | 35 public: |
36 LauncherTooltipManagerTest() {} | 36 LauncherTooltipManagerTest() {} |
37 virtual ~LauncherTooltipManagerTest() {} | 37 virtual ~LauncherTooltipManagerTest() {} |
38 | 38 |
39 virtual void SetUp() OVERRIDE { | 39 virtual void SetUp() OVERRIDE { |
40 AshTestBase::SetUp(); | 40 AshTestBase::SetUp(); |
41 internal::RootWindowController* controller = | 41 internal::RootWindowController* controller = |
42 Shell::GetPrimaryRootWindowController(); | 42 Shell::GetPrimaryRootWindowController(); |
43 tooltip_manager_.reset(new internal::LauncherTooltipManager( | 43 tooltip_manager_.reset(new internal::LauncherTooltipManager( |
44 SHELF_ALIGNMENT_BOTTOM, | |
45 controller->shelf(), | 44 controller->shelf(), |
46 controller->launcher()->GetLauncherViewForTest())); | 45 controller->launcher()->GetLauncherViewForTest())); |
47 } | 46 } |
48 | 47 |
49 virtual void TearDown() OVERRIDE { | 48 virtual void TearDown() OVERRIDE { |
50 tooltip_manager_.reset(); | 49 tooltip_manager_.reset(); |
51 AshTestBase::TearDown(); | 50 AshTestBase::TearDown(); |
52 } | 51 } |
53 | 52 |
54 void ShowDelayed() { | 53 void ShowDelayed() { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // Should hide if the mouse is out of the tooltip. | 211 // Should hide if the mouse is out of the tooltip. |
213 test_api.set_location(tooltip_rect.origin() + gfx::Vector2d(-1, -1)); | 212 test_api.set_location(tooltip_rect.origin() + gfx::Vector2d(-1, -1)); |
214 EXPECT_EQ(ui::ER_UNHANDLED, | 213 EXPECT_EQ(ui::ER_UNHANDLED, |
215 event_handler->OnMouseEvent(&mouse_event)); | 214 event_handler->OnMouseEvent(&mouse_event)); |
216 RunAllPendingInMessageLoop(); | 215 RunAllPendingInMessageLoop(); |
217 EXPECT_FALSE(TooltipIsVisible()); | 216 EXPECT_FALSE(TooltipIsVisible()); |
218 } | 217 } |
219 | 218 |
220 } // namespace test | 219 } // namespace test |
221 } // namespace ash | 220 } // namespace ash |
OLD | NEW |