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

Side by Side Diff: trunk/src/ash/shelf/shelf_layout_manager_unittest.cc

Issue 59153004: Revert 233787 "Eliminate Shell::RootWindowList in favor of aura:..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( 872 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
873 display_layout); 873 display_layout);
874 // Put the primary monitor's shelf on the display boundary. 874 // Put the primary monitor's shelf on the display boundary.
875 ShelfLayoutManager* shelf = GetShelfLayoutManager(); 875 ShelfLayoutManager* shelf = GetShelfLayoutManager();
876 shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT); 876 shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT);
877 877
878 // Create a window because the shelf is always shown when no windows are 878 // Create a window because the shelf is always shown when no windows are
879 // visible. 879 // visible.
880 CreateTestWidget(); 880 CreateTestWidget();
881 881
882 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); 882 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
883 ASSERT_EQ(root_windows[0], 883 ASSERT_EQ(root_windows[0],
884 GetShelfWidget()->GetNativeWindow()->GetRootWindow()); 884 GetShelfWidget()->GetNativeWindow()->GetRootWindow());
885 885
886 shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); 886 shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
887 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state()); 887 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
888 888
889 int right_edge = root_windows[0]->GetBoundsInScreen().right() - 1; 889 int right_edge = root_windows[0]->GetBoundsInScreen().right() - 1;
890 int y = root_windows[0]->GetBoundsInScreen().y(); 890 int y = root_windows[0]->GetBoundsInScreen().y();
891 891
892 // Start off the mouse nowhere near the shelf; the shelf should be hidden. 892 // Start off the mouse nowhere near the shelf; the shelf should be hidden.
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 shelf->SetAlignment(SHELF_ALIGNMENT_LEFT); 1855 shelf->SetAlignment(SHELF_ALIGNMENT_LEFT);
1856 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); 1856 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
1857 generator.ClickLeftButton(); 1857 generator.ClickLeftButton();
1858 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); 1858 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown());
1859 generator.ClickLeftButton(); 1859 generator.ClickLeftButton();
1860 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); 1860 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
1861 } 1861 }
1862 1862
1863 } // namespace internal 1863 } // namespace internal
1864 } // namespace ash 1864 } // namespace ash
OLDNEW
« no previous file with comments | « trunk/src/ash/root_window_controller_unittest.cc ('k') | trunk/src/ash/shelf/shelf_widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698