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

Side by Side Diff: ash/root_window_controller_unittest.cc

Issue 1261693004: Allow dynamic enabling/disabling of unified desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/root_window_controller.cc ('k') | ash/screen_util_unittest.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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include "ash/display/display_manager.h" 7 #include "ash/display/display_manager.h"
8 #include "ash/session/session_state_delegate.h" 8 #include "ash/session/session_state_delegate.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 EXPECT_EQ(root_windows[0], modal->GetNativeView()->GetRootWindow()); 286 EXPECT_EQ(root_windows[0], modal->GetNativeView()->GetRootWindow());
287 EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView())); 287 EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView()));
288 generator_1st.ClickLeftButton(); 288 generator_1st.ClickLeftButton();
289 EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView())); 289 EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView()));
290 } 290 }
291 291
292 // Make sure lock related windows moves. 292 // Make sure lock related windows moves.
293 TEST_F(RootWindowControllerTest, MoveWindows_LockWindowsInUnified) { 293 TEST_F(RootWindowControllerTest, MoveWindows_LockWindowsInUnified) {
294 if (!SupportsMultipleDisplays()) 294 if (!SupportsMultipleDisplays())
295 return; 295 return;
296 test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); 296 Shell::GetInstance()->display_manager()->SetUnifiedDesktopEnabled(true);
297 297
298 UpdateDisplay("500x500"); 298 UpdateDisplay("500x500");
299 const int kLockScreenWindowId = 1000; 299 const int kLockScreenWindowId = 1000;
300 const int kLockBackgroundWindowId = 1001; 300 const int kLockBackgroundWindowId = 1001;
301 301
302 RootWindowController* controller = 302 RootWindowController* controller =
303 Shell::GetInstance()->GetPrimaryRootWindowController(); 303 Shell::GetInstance()->GetPrimaryRootWindowController();
304 304
305 aura::Window* lock_container = 305 aura::Window* lock_container =
306 controller->GetContainer(kShellWindowId_LockScreenContainer); 306 controller->GetContainer(kShellWindowId_LockScreenContainer);
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 keyboard_controller->proxy()->GetKeyboardWindow()->SetBounds( 1030 keyboard_controller->proxy()->GetKeyboardWindow()->SetBounds(
1031 gfx::Rect(0, 400, 800, 200)); 1031 gfx::Rect(0, 400, 800, 200));
1032 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString()); 1032 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString());
1033 1033
1034 UpdateDisplay("600x800"); 1034 UpdateDisplay("600x800");
1035 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString()); 1035 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString());
1036 } 1036 }
1037 1037
1038 } // namespace test 1038 } // namespace test
1039 } // namespace ash 1039 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/screen_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698