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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
6 | 6 |
7 #include "ash/session_state_delegate.h" | 7 #include "ash/session_state_delegate.h" |
8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 // share the same desktop workspace, which cancels the shelf status. | 236 // share the same desktop workspace, which cancels the shelf status. |
237 fullscreen->SetFullscreen(false); | 237 fullscreen->SetFullscreen(false); |
238 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow()); | 238 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow()); |
239 EXPECT_EQ("0,0 600x597", | 239 EXPECT_EQ("0,0 600x597", |
240 maximized->GetWindowBoundsInScreen().ToString()); | 240 maximized->GetWindowBoundsInScreen().ToString()); |
241 EXPECT_EQ("0,0 600x597", | 241 EXPECT_EQ("0,0 600x597", |
242 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); | 242 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); |
243 | 243 |
244 // Set fullscreen to true. In that case the 3px inset becomes invisible so | 244 // Set fullscreen to true. In that case the 3px inset becomes invisible so |
245 // the maximized window can also use the area fully. | 245 // the maximized window can also use the area fully. |
| 246 fullscreen->Activate(); |
246 fullscreen->SetFullscreen(true); | 247 fullscreen->SetFullscreen(true); |
247 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow()); | 248 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow()); |
248 EXPECT_EQ("0,0 600x600", | 249 EXPECT_EQ("0,0 600x600", |
249 maximized->GetWindowBoundsInScreen().ToString()); | 250 maximized->GetWindowBoundsInScreen().ToString()); |
250 EXPECT_EQ("0,0 600x600", | 251 EXPECT_EQ("0,0 600x600", |
251 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); | 252 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); |
252 | 253 |
253 EXPECT_EQ(root_windows[0], minimized->GetNativeView()->GetRootWindow()); | 254 EXPECT_EQ(root_windows[0], minimized->GetNativeView()->GetRootWindow()); |
254 EXPECT_EQ("200,10 100x100", | 255 EXPECT_EQ("200,10 100x100", |
255 minimized->GetWindowBoundsInScreen().ToString()); | 256 minimized->GetWindowBoundsInScreen().ToString()); |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 aura::WindowTracker tracker; | 698 aura::WindowTracker tracker; |
698 tracker.Add(keyboard_container); | 699 tracker.Add(keyboard_container); |
699 // Mock a login user profile change to reinitialize the keyboard. | 700 // Mock a login user profile change to reinitialize the keyboard. |
700 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); | 701 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); |
701 // keyboard_container should no longer be present. | 702 // keyboard_container should no longer be present. |
702 EXPECT_FALSE(tracker.Contains(keyboard_container)); | 703 EXPECT_FALSE(tracker.Contains(keyboard_container)); |
703 } | 704 } |
704 | 705 |
705 } // namespace test | 706 } // namespace test |
706 } // namespace ash | 707 } // namespace ash |
OLD | NEW |