Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: ash/launcher/launcher_tooltip_manager_unittest.cc

Issue 23449033: [ash] Remove Launcher::GetLauncherViewForTest() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing class keyword Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/launcher/launcher.cc ('k') | ash/launcher/launcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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"
11 #include "ash/shell_window_ids.h" 11 #include "ash/shell_window_ids.h"
12 #include "ash/test/ash_test_base.h" 12 #include "ash/test/ash_test_base.h"
13 #include "ash/test/launcher_test_api.h"
13 #include "ash/wm/window_util.h" 14 #include "ash/wm/window_util.h"
14 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
15 #include "base/time/time.h" 16 #include "base/time/time.h"
16 #include "ui/aura/root_window.h" 17 #include "ui/aura/root_window.h"
17 #include "ui/base/events/event.h" 18 #include "ui/base/events/event.h"
18 #include "ui/base/events/event_constants.h" 19 #include "ui/base/events/event_constants.h"
19 #include "ui/base/events/event_handler.h" 20 #include "ui/base/events/event_handler.h"
20 #include "ui/base/keycodes/keyboard_codes.h" 21 #include "ui/base/keycodes/keyboard_codes.h"
21 #include "ui/views/widget/widget.h" 22 #include "ui/views/widget/widget.h"
22 23
(...skipping 14 matching lines...) Expand all
37 public: 38 public:
38 LauncherTooltipManagerTest() {} 39 LauncherTooltipManagerTest() {}
39 virtual ~LauncherTooltipManagerTest() {} 40 virtual ~LauncherTooltipManagerTest() {}
40 41
41 virtual void SetUp() OVERRIDE { 42 virtual void SetUp() OVERRIDE {
42 AshTestBase::SetUp(); 43 AshTestBase::SetUp();
43 internal::RootWindowController* controller = 44 internal::RootWindowController* controller =
44 Shell::GetPrimaryRootWindowController(); 45 Shell::GetPrimaryRootWindowController();
45 tooltip_manager_.reset(new internal::LauncherTooltipManager( 46 tooltip_manager_.reset(new internal::LauncherTooltipManager(
46 controller->GetShelfLayoutManager(), 47 controller->GetShelfLayoutManager(),
47 controller->shelf()->launcher()->GetLauncherViewForTest())); 48 LauncherTestAPI(controller->shelf()->launcher()).launcher_view()));
48 } 49 }
49 50
50 virtual void TearDown() OVERRIDE { 51 virtual void TearDown() OVERRIDE {
51 tooltip_manager_.reset(); 52 tooltip_manager_.reset();
52 AshTestBase::TearDown(); 53 AshTestBase::TearDown();
53 } 54 }
54 55
55 void ShowDelayed() { 56 void ShowDelayed() {
56 CreateWidget(); 57 CreateWidget();
57 tooltip_manager_->ShowDelayed(dummy_anchor_.get(), base::string16()); 58 tooltip_manager_->ShowDelayed(dummy_anchor_.get(), base::string16());
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 276
276 SetEventTarget(root_window, &mouse_event); 277 SetEventTarget(root_window, &mouse_event);
277 event_handler->OnMouseEvent(&mouse_event); 278 event_handler->OnMouseEvent(&mouse_event);
278 EXPECT_FALSE(mouse_event.handled()); 279 EXPECT_FALSE(mouse_event.handled());
279 RunAllPendingInMessageLoop(); 280 RunAllPendingInMessageLoop();
280 EXPECT_FALSE(TooltipIsVisible()); 281 EXPECT_FALSE(TooltipIsVisible());
281 } 282 }
282 283
283 } // namespace test 284 } // namespace test
284 } // namespace ash 285 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher.cc ('k') | ash/launcher/launcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698