| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 188 |
| 189 // Shouldn't hide if the mouse is in the tooltip. | 189 // Shouldn't hide if the mouse is in the tooltip. |
| 190 ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, tooltip_rect.CenterPoint(), | 190 ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, tooltip_rect.CenterPoint(), |
| 191 tooltip_rect.CenterPoint(), ui::EF_NONE); | 191 tooltip_rect.CenterPoint(), ui::EF_NONE); |
| 192 ui::LocatedEvent::TestApi test_api(&mouse_event); | 192 ui::LocatedEvent::TestApi test_api(&mouse_event); |
| 193 | 193 |
| 194 EXPECT_FALSE(event_filter->PreHandleMouseEvent(root_window, &mouse_event)); | 194 EXPECT_FALSE(event_filter->PreHandleMouseEvent(root_window, &mouse_event)); |
| 195 EXPECT_TRUE(TooltipIsVisible()); | 195 EXPECT_TRUE(TooltipIsVisible()); |
| 196 | 196 |
| 197 // Should hide if the mouse is out of the tooltip. | 197 // Should hide if the mouse is out of the tooltip. |
| 198 test_api.set_location(tooltip_rect.origin().Add(gfx::Point(-1, -1))); | 198 test_api.set_location(tooltip_rect.origin().Add(gfx::Vector2d(-1, -1))); |
| 199 EXPECT_FALSE(event_filter->PreHandleMouseEvent(root_window, &mouse_event)); | 199 EXPECT_FALSE(event_filter->PreHandleMouseEvent(root_window, &mouse_event)); |
| 200 RunAllPendingInMessageLoop(); | 200 RunAllPendingInMessageLoop(); |
| 201 EXPECT_FALSE(TooltipIsVisible()); | 201 EXPECT_FALSE(TooltipIsVisible()); |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace test | 204 } // namespace test |
| 205 } // namespace ash | 205 } // namespace ash |
| OLD | NEW |