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

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

Issue 2911393002: Nix GetRootWindowController, use RootWindowController::ForWindow. (Closed)
Patch Set: Sync and rebase AGAIN Created 3 years, 6 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/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shell.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) 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/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf.h" 8 #include "ash/shelf/shelf.h"
9 #include "ash/shelf/shelf_constants.h" 9 #include "ash/shelf/shelf_constants.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 19 matching lines...) Expand all
30 return test::AshTestBase::GetPrimaryShelf()->shelf_widget(); 30 return test::AshTestBase::GetPrimaryShelf()->shelf_widget();
31 } 31 }
32 32
33 ShelfLayoutManager* GetShelfLayoutManager() { 33 ShelfLayoutManager* GetShelfLayoutManager() {
34 return GetShelfWidget()->shelf_layout_manager(); 34 return GetShelfWidget()->shelf_layout_manager();
35 } 35 }
36 36
37 void TestLauncherAlignment(aura::Window* root, 37 void TestLauncherAlignment(aura::Window* root,
38 ShelfAlignment alignment, 38 ShelfAlignment alignment,
39 const gfx::Rect& expected) { 39 const gfx::Rect& expected) {
40 GetRootWindowController(root)->shelf()->SetAlignment(alignment); 40 Shelf::ForWindow(root)->SetAlignment(alignment);
41 EXPECT_EQ(expected.ToString(), display::Screen::GetScreen() 41 EXPECT_EQ(expected.ToString(), display::Screen::GetScreen()
42 ->GetDisplayNearestWindow(root) 42 ->GetDisplayNearestWindow(root)
43 .work_area() 43 .work_area()
44 .ToString()); 44 .ToString());
45 } 45 }
46 46
47 using ShelfWidgetTest = test::AshTestBase; 47 using ShelfWidgetTest = test::AshTestBase;
48 48
49 TEST_F(ShelfWidgetTest, TestAlignment) { 49 TEST_F(ShelfWidgetTest, TestAlignment) {
50 UpdateDisplay("400x400"); 50 UpdateDisplay("400x400");
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } 398 }
399 399
400 TEST_F(ShelfWidgetAfterLoginTest, CreateLockedShelf) { 400 TEST_F(ShelfWidgetAfterLoginTest, CreateLockedShelf) {
401 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior. 401 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
402 TestShelf(SHELF_ALIGNMENT_BOTTOM_LOCKED, SHELF_AUTO_HIDE_BEHAVIOR_NEVER, 402 TestShelf(SHELF_ALIGNMENT_BOTTOM_LOCKED, SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
403 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN); 403 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
404 } 404 }
405 405
406 } // namespace 406 } // namespace
407 } // namespace ash 407 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698