OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shelf/shelf_tooltip_manager.h" | 5 #include "ash/shelf/shelf_tooltip_manager.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
9 #include "ash/shelf/shelf_widget.h" | 9 #include "ash/shelf/shelf_widget.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 } | 33 } |
34 | 34 |
35 namespace ash { | 35 namespace ash { |
36 namespace test { | 36 namespace test { |
37 | 37 |
38 class ShelfTooltipManagerTest : public AshTestBase { | 38 class ShelfTooltipManagerTest : public AshTestBase { |
39 public: | 39 public: |
40 ShelfTooltipManagerTest() {} | 40 ShelfTooltipManagerTest() {} |
41 virtual ~ShelfTooltipManagerTest() {} | 41 virtual ~ShelfTooltipManagerTest() {} |
42 | 42 |
43 virtual void SetUp() OVERRIDE { | 43 virtual void SetUp() override { |
44 AshTestBase::SetUp(); | 44 AshTestBase::SetUp(); |
45 RootWindowController* controller = Shell::GetPrimaryRootWindowController(); | 45 RootWindowController* controller = Shell::GetPrimaryRootWindowController(); |
46 tooltip_manager_.reset(new ShelfTooltipManager( | 46 tooltip_manager_.reset(new ShelfTooltipManager( |
47 controller->GetShelfLayoutManager(), | 47 controller->GetShelfLayoutManager(), |
48 ShelfTestAPI(controller->shelf()->shelf()).shelf_view())); | 48 ShelfTestAPI(controller->shelf()->shelf()).shelf_view())); |
49 } | 49 } |
50 | 50 |
51 virtual void TearDown() OVERRIDE { | 51 virtual void TearDown() override { |
52 tooltip_manager_.reset(); | 52 tooltip_manager_.reset(); |
53 AshTestBase::TearDown(); | 53 AshTestBase::TearDown(); |
54 } | 54 } |
55 | 55 |
56 void ShowDelayed() { | 56 void ShowDelayed() { |
57 CreateWidget(); | 57 CreateWidget(); |
58 tooltip_manager_->ShowDelayed(dummy_anchor_.get(), base::string16()); | 58 tooltip_manager_->ShowDelayed(dummy_anchor_.get(), base::string16()); |
59 } | 59 } |
60 | 60 |
61 void ShowImmediately() { | 61 void ShowImmediately() { |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 | 279 |
280 SetEventTarget(root_window, &mouse_event); | 280 SetEventTarget(root_window, &mouse_event); |
281 event_handler->OnMouseEvent(&mouse_event); | 281 event_handler->OnMouseEvent(&mouse_event); |
282 EXPECT_FALSE(mouse_event.handled()); | 282 EXPECT_FALSE(mouse_event.handled()); |
283 RunAllPendingInMessageLoop(); | 283 RunAllPendingInMessageLoop(); |
284 EXPECT_FALSE(TooltipIsVisible()); | 284 EXPECT_FALSE(TooltipIsVisible()); |
285 } | 285 } |
286 | 286 |
287 } // namespace test | 287 } // namespace test |
288 } // namespace ash | 288 } // namespace ash |
OLD | NEW |