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

Side by Side Diff: ash/wm/panels/panel_layout_manager_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, 1 month 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/wm/panels/panel_layout_manager.cc ('k') | ash/wm/panels/panel_window_resizer.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/wm/panels/panel_layout_manager.h" 5 #include "ash/wm/panels/panel_layout_manager.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/launcher/launcher.h" 8 #include "ash/launcher/launcher.h"
9 #include "ash/launcher/launcher_button.h" 9 #include "ash/launcher/launcher_button.h"
10 #include "ash/launcher/launcher_model.h" 10 #include "ash/launcher/launcher_model.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 int index = model->ItemIndexByID(launcher_delegate->GetIDByWindow(window)); 229 int index = model->ItemIndexByID(launcher_delegate->GetIDByWindow(window));
230 gfx::Rect bounds = test_api.GetButton(index)->GetBoundsInScreen(); 230 gfx::Rect bounds = test_api.GetButton(index)->GetBoundsInScreen();
231 231
232 aura::test::EventGenerator& event_generator = GetEventGenerator(); 232 aura::test::EventGenerator& event_generator = GetEventGenerator();
233 event_generator.MoveMouseTo(bounds.CenterPoint()); 233 event_generator.MoveMouseTo(bounds.CenterPoint());
234 event_generator.ClickLeftButton(); 234 event_generator.ClickLeftButton();
235 235
236 test_api.RunMessageLoopUntilAnimationsDone(); 236 test_api.RunMessageLoopUntilAnimationsDone();
237 } 237 }
238 238
239 void SetAlignment(aura::RootWindow* root_window, ShelfAlignment alignment) { 239 void SetAlignment(aura::Window* root_window, ShelfAlignment alignment) {
240 ash::Shell* shell = ash::Shell::GetInstance(); 240 ash::Shell* shell = ash::Shell::GetInstance();
241 shell->SetShelfAlignment(alignment, root_window); 241 shell->SetShelfAlignment(alignment, root_window);
242 } 242 }
243 243
244 ShelfAlignment GetAlignment(aura::RootWindow* root_window) { 244 ShelfAlignment GetAlignment(aura::Window* root_window) {
245 ash::Shell* shell = ash::Shell::GetInstance(); 245 ash::Shell* shell = ash::Shell::GetInstance();
246 return shell->GetShelfAlignment(root_window); 246 return shell->GetShelfAlignment(root_window);
247 } 247 }
248 248
249 void SetShelfAutoHideBehavior(aura::Window* window, 249 void SetShelfAutoHideBehavior(aura::Window* window,
250 ShelfAutoHideBehavior behavior) { 250 ShelfAutoHideBehavior behavior) {
251 internal::ShelfLayoutManager* shelf = 251 internal::ShelfLayoutManager* shelf =
252 RootWindowController::ForWindow(window)->shelf()-> 252 RootWindowController::ForWindow(window)->shelf()->
253 shelf_layout_manager(); 253 shelf_layout_manager();
254 shelf->SetAutoHideBehavior(behavior); 254 shelf->SetAutoHideBehavior(behavior);
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 EXPECT_TRUE(w1->IsVisible()); 778 EXPECT_TRUE(w1->IsVisible());
779 EXPECT_FALSE(w2->IsVisible()); 779 EXPECT_FALSE(w2->IsVisible());
780 EXPECT_TRUE(w3->IsVisible()); 780 EXPECT_TRUE(w3->IsVisible());
781 } 781 }
782 782
783 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelLayoutManagerTextDirectionTest, 783 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelLayoutManagerTextDirectionTest,
784 testing::Bool()); 784 testing::Bool());
785 785
786 } // namespace internal 786 } // namespace internal
787 } // namespace ash 787 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_layout_manager.cc ('k') | ash/wm/panels/panel_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698