| 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/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
| 8 #include "ash/wm/shelf_layout_manager.h" | 8 #include "ash/wm/shelf_layout_manager.h" |
| 9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "base/time.h" | 11 #include "base/time.h" |
| 12 #include "ui/aura/event_filter.h" | 12 #include "ui/aura/event_filter.h" |
| 13 #include "ui/aura/root_window.h" | 13 #include "ui/aura/root_window.h" |
| 14 #include "ui/base/event.h" | 14 #include "ui/base/events/event.h" |
| 15 #include "ui/base/events.h" | 15 #include "ui/base/events/event_constants.h" |
| 16 #include "ui/base/keycodes/keyboard_codes.h" | 16 #include "ui/base/keycodes/keyboard_codes.h" |
| 17 #include "ui/views/widget/widget.h" | 17 #include "ui/views/widget/widget.h" |
| 18 | 18 |
| 19 namespace ash { | 19 namespace ash { |
| 20 namespace test { | 20 namespace test { |
| 21 | 21 |
| 22 class LauncherTooltipManagerTest : public AshTestBase { | 22 class LauncherTooltipManagerTest : public AshTestBase { |
| 23 public: | 23 public: |
| 24 LauncherTooltipManagerTest() {} | 24 LauncherTooltipManagerTest() {} |
| 25 virtual ~LauncherTooltipManagerTest() {} | 25 virtual ~LauncherTooltipManagerTest() {} |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 // Should hide if the mouse is out of the tooltip. | 192 // Should hide if the mouse is out of the tooltip. |
| 193 test_api.set_location(tooltip_rect.origin().Add(gfx::Point(-1, -1))); | 193 test_api.set_location(tooltip_rect.origin().Add(gfx::Point(-1, -1))); |
| 194 EXPECT_FALSE(event_filter->PreHandleMouseEvent(root_window, &mouse_event)); | 194 EXPECT_FALSE(event_filter->PreHandleMouseEvent(root_window, &mouse_event)); |
| 195 RunAllPendingInMessageLoop(); | 195 RunAllPendingInMessageLoop(); |
| 196 EXPECT_FALSE(TooltipIsVisible()); | 196 EXPECT_FALSE(TooltipIsVisible()); |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace test | 199 } // namespace test |
| 200 } // namespace ash | 200 } // namespace ash |
| OLD | NEW |