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

Side by Side Diff: ash/shelf/shelf_widget_unittest.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | ash/shell.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_widget.h" 5 #include "ash/shelf/shelf_widget.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/launcher/launcher_button.h" 8 #include "ash/launcher/launcher_button.h"
9 #include "ash/launcher/launcher_model.h" 9 #include "ash/launcher/launcher_model.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 ShelfWidget* shelf_widget = launcher->shelf_widget(); 47 ShelfWidget* shelf_widget = launcher->shelf_widget();
48 EXPECT_FALSE(shelf_widget->CanActivate()); 48 EXPECT_FALSE(shelf_widget->CanActivate());
49 49
50 shelf_widget->WillActivateAsFallback(); 50 shelf_widget->WillActivateAsFallback();
51 EXPECT_TRUE(shelf_widget->CanActivate()); 51 EXPECT_TRUE(shelf_widget->CanActivate());
52 52
53 wm::ActivateWindow(shelf_widget->GetNativeWindow()); 53 wm::ActivateWindow(shelf_widget->GetNativeWindow());
54 EXPECT_FALSE(shelf_widget->CanActivate()); 54 EXPECT_FALSE(shelf_widget->CanActivate());
55 } 55 }
56 56
57 void TestLauncherAlignment(aura::RootWindow* root, 57 void TestLauncherAlignment(aura::Window* root,
58 ShelfAlignment alignment, 58 ShelfAlignment alignment,
59 const std::string& expected) { 59 const std::string& expected) {
60 Shell::GetInstance()->SetShelfAlignment(alignment, root); 60 Shell::GetInstance()->SetShelfAlignment(alignment, root);
61 gfx::Screen* screen = gfx::Screen::GetScreenFor(root); 61 gfx::Screen* screen = gfx::Screen::GetScreenFor(root);
62 EXPECT_EQ(expected, 62 EXPECT_EQ(expected,
63 screen->GetDisplayNearestWindow(root).work_area().ToString()); 63 screen->GetDisplayNearestWindow(root).work_area().ToString());
64 } 64 }
65 65
66 TEST_F(ShelfWidgetTest, TestAlignment) { 66 TEST_F(ShelfWidgetTest, TestAlignment) {
67 Launcher* launcher = Launcher::ForPrimaryDisplay(); 67 Launcher* launcher = Launcher::ForPrimaryDisplay();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 const int status_width = 185 const int status_width =
186 shelf->status_area_widget()->GetWindowBoundsInScreen().width(); 186 shelf->status_area_widget()->GetWindowBoundsInScreen().width();
187 EXPECT_GT(status_width, 0); 187 EXPECT_GT(status_width, 0);
188 EXPECT_EQ(status_width, 188 EXPECT_EQ(status_width,
189 shelf->GetContentsView()->width() - 189 shelf->GetContentsView()->width() -
190 test::LauncherTestAPI(launcher).shelf_view()->width()); 190 test::LauncherTestAPI(launcher).shelf_view()->width());
191 } 191 }
192 #endif 192 #endif
193 193
194 } // namespace ash 194 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698