OLD | NEW |
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/common/wm/workspace/workspace_layout_manager.h" | 5 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "ash/common/session/session_controller.h" | 10 #include "ash/common/session/session_controller.h" |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 | 920 |
921 WmShelf* shelf = GetPrimaryShelf(); | 921 WmShelf* shelf = GetPrimaryShelf(); |
922 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); | 922 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
923 | 923 |
924 window->SetBounds(wm::GetMaximizedWindowBoundsInParent(window)); | 924 window->SetBounds(wm::GetMaximizedWindowBoundsInParent(window)); |
925 gfx::Rect window_bounds = window->GetBounds(); | 925 gfx::Rect window_bounds = window->GetBounds(); |
926 EXPECT_EQ(wm::GetMaximizedWindowBoundsInParent(window).ToString(), | 926 EXPECT_EQ(wm::GetMaximizedWindowBoundsInParent(window).ToString(), |
927 window_bounds.ToString()); | 927 window_bounds.ToString()); |
928 | 928 |
929 // The window size should not get touched while we are in lock screen. | 929 // The window size should not get touched while we are in lock screen. |
930 WmShell::Get()->session_controller()->LockScreenAndFlushForTest(); | 930 Shell::Get()->session_controller()->LockScreenAndFlushForTest(); |
931 ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager(); | 931 ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager(); |
932 shelf_layout_manager->UpdateVisibilityState(); | 932 shelf_layout_manager->UpdateVisibilityState(); |
933 EXPECT_EQ(window_bounds.ToString(), window->GetBounds().ToString()); | 933 EXPECT_EQ(window_bounds.ToString(), window->GetBounds().ToString()); |
934 | 934 |
935 // Coming out of the lock screen the window size should still remain. | 935 // Coming out of the lock screen the window size should still remain. |
936 GetSessionControllerClient()->UnlockScreen(); | 936 GetSessionControllerClient()->UnlockScreen(); |
937 shelf_layout_manager->UpdateVisibilityState(); | 937 shelf_layout_manager->UpdateVisibilityState(); |
938 EXPECT_EQ(wm::GetMaximizedWindowBoundsInParent(window).ToString(), | 938 EXPECT_EQ(wm::GetMaximizedWindowBoundsInParent(window).ToString(), |
939 window_bounds.ToString()); | 939 window_bounds.ToString()); |
940 EXPECT_EQ(window_bounds.ToString(), window->GetBounds().ToString()); | 940 EXPECT_EQ(window_bounds.ToString(), window->GetBounds().ToString()); |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 window->SetBounds(keyboard_bounds()); | 1279 window->SetBounds(keyboard_bounds()); |
1280 window->GetWindowState()->set_ignore_keyboard_bounds_change(true); | 1280 window->GetWindowState()->set_ignore_keyboard_bounds_change(true); |
1281 window->Activate(); | 1281 window->Activate(); |
1282 | 1282 |
1283 EXPECT_EQ(keyboard_bounds(), window->GetBounds()); | 1283 EXPECT_EQ(keyboard_bounds(), window->GetBounds()); |
1284 ShowKeyboard(); | 1284 ShowKeyboard(); |
1285 EXPECT_EQ(keyboard_bounds(), window->GetBounds()); | 1285 EXPECT_EQ(keyboard_bounds(), window->GetBounds()); |
1286 } | 1286 } |
1287 | 1287 |
1288 } // namespace ash | 1288 } // namespace ash |
OLD | NEW |