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

Side by Side Diff: ash/wm/immersive_fullscreen_controller_unittest.cc

Issue 64933002: Eliminate Shell::RootWindowList in favor of aura::Window::Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/wm/immersive_fullscreen_controller.h" 5 #include "ash/wm/immersive_fullscreen_controller.h"
6 6
7 #include "ash/display/display_manager.h" 7 #include "ash/display/display_manager.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/screen_ash.h" 9 #include "ash/screen_ash.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 // Set up initial state. 430 // Set up initial state.
431 UpdateDisplay("800x600,800x600"); 431 UpdateDisplay("800x600,800x600");
432 ash::DisplayLayout display_layout(ash::DisplayLayout::TOP, 0); 432 ash::DisplayLayout display_layout(ash::DisplayLayout::TOP, 0);
433 ash::Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( 433 ash::Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
434 display_layout); 434 display_layout);
435 435
436 controller()->SetEnabled(true); 436 controller()->SetEnabled(true);
437 ASSERT_TRUE(controller()->IsEnabled()); 437 ASSERT_TRUE(controller()->IsEnabled());
438 ASSERT_FALSE(controller()->IsRevealed()); 438 ASSERT_FALSE(controller()->IsRevealed());
439 439
440 ash::Shell::RootWindowList root_windows = ash::Shell::GetAllRootWindows(); 440 aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows();
441 ASSERT_EQ(root_windows[0], 441 ASSERT_EQ(root_windows[0],
442 top_container()->GetWidget()->GetNativeWindow()->GetRootWindow()); 442 top_container()->GetWidget()->GetNativeWindow()->GetRootWindow());
443 443
444 gfx::Rect primary_root_window_bounds_in_screen = 444 gfx::Rect primary_root_window_bounds_in_screen =
445 root_windows[0]->GetBoundsInScreen(); 445 root_windows[0]->GetBoundsInScreen();
446 // Do not set |x| to the root window's x position because the display's 446 // Do not set |x| to the root window's x position because the display's
447 // corners have special behavior. 447 // corners have special behavior.
448 int x = primary_root_window_bounds_in_screen.x() + 10; 448 int x = primary_root_window_bounds_in_screen.x() + 10;
449 // The y position of the top edge of the primary display. 449 // The y position of the top edge of the primary display.
450 int y_top_edge = primary_root_window_bounds_in_screen.y(); 450 int y_top_edge = primary_root_window_bounds_in_screen.y();
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 // Disabling immersive fullscreen maintains the user's auto-hide selection. 890 // Disabling immersive fullscreen maintains the user's auto-hide selection.
891 controller()->SetEnabled(false); 891 controller()->SetEnabled(false);
892 window()->SetProperty(aura::client::kShowStateKey, 892 window()->SetProperty(aura::client::kShowStateKey,
893 ui::SHOW_STATE_NORMAL); 893 ui::SHOW_STATE_NORMAL);
894 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); 894 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
895 } 895 }
896 896
897 } // namespase ash 897 } // namespase ash
898 898
899 #endif // defined(OS_CHROMEOS) 899 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698