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

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

Issue 11434099: Use the correct launcher assets for shelf alignment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up Created 8 years 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 | Annotate | Revision Log
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/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
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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // Should hide if the mouse is out of the tooltip. 212 // Should hide if the mouse is out of the tooltip.
214 test_api.set_location(tooltip_rect.origin() + gfx::Vector2d(-1, -1)); 213 test_api.set_location(tooltip_rect.origin() + gfx::Vector2d(-1, -1));
215 EXPECT_EQ(ui::ER_UNHANDLED, 214 EXPECT_EQ(ui::ER_UNHANDLED,
216 event_handler->OnMouseEvent(&mouse_event)); 215 event_handler->OnMouseEvent(&mouse_event));
217 RunAllPendingInMessageLoop(); 216 RunAllPendingInMessageLoop();
218 EXPECT_FALSE(TooltipIsVisible()); 217 EXPECT_FALSE(TooltipIsVisible());
219 } 218 }
220 219
221 } // namespace test 220 } // namespace test
222 } // namespace ash 221 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698