Chromium Code Reviews| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
| 10 #include "ash/session/session_state_delegate.h" | 10 #include "ash/session/session_state_delegate.h" |
| 11 #include "ash/shelf/shelf_constants.h" | |
|
bruthig
2016/05/25 20:24:52
Is this needed? This file doesn't appear to actua
yiyix
2016/06/02 03:54:53
Done.
| |
| 11 #include "ash/shelf/shelf_layout_manager.h" | 12 #include "ash/shelf/shelf_layout_manager.h" |
| 12 #include "ash/shell.h" | 13 #include "ash/shell.h" |
| 13 #include "ash/shell_window_ids.h" | 14 #include "ash/shell_window_ids.h" |
| 14 #include "ash/system/tray/system_tray_delegate.h" | 15 #include "ash/system/tray/system_tray_delegate.h" |
| 15 #include "ash/test/ash_test_base.h" | 16 #include "ash/test/ash_test_base.h" |
| 16 #include "ash/test/display_manager_test_api.h" | 17 #include "ash/test/display_manager_test_api.h" |
| 17 #include "ash/wm/common/window_state.h" | 18 #include "ash/wm/common/window_state.h" |
| 18 #include "ash/wm/system_modal_container_layout_manager.h" | 19 #include "ash/wm/system_modal_container_layout_manager.h" |
| 19 #include "ash/wm/window_properties.h" | 20 #include "ash/wm/window_properties.h" |
| 20 #include "ash/wm/window_state_aura.h" | 21 #include "ash/wm/window_state_aura.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 | 199 |
| 199 // d2 must have been deleted. | 200 // d2 must have been deleted. |
| 200 EXPECT_FALSE(tracker.Contains(d2)); | 201 EXPECT_FALSE(tracker.Contains(d2)); |
| 201 | 202 |
| 202 EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow()); | 203 EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow()); |
| 203 EXPECT_EQ("100,20 100x100", normal->GetWindowBoundsInScreen().ToString()); | 204 EXPECT_EQ("100,20 100x100", normal->GetWindowBoundsInScreen().ToString()); |
| 204 EXPECT_EQ("100,20 100x100", | 205 EXPECT_EQ("100,20 100x100", |
| 205 normal->GetNativeView()->GetBoundsInRootWindow().ToString()); | 206 normal->GetNativeView()->GetBoundsInRootWindow().ToString()); |
| 206 | 207 |
| 207 // Maximized area on primary display has 3px (given as | 208 // Maximized area on primary display has 3px (given as |
| 208 // kAutoHideSize in shelf_layout_manager.cc) inset at the bottom. | 209 // kAutoHideSize in shelf_constants.cc) inset at the bottom. |
| 209 | 210 |
| 210 // First clear fullscreen status, since both fullscreen and maximized windows | 211 // First clear fullscreen status, since both fullscreen and maximized windows |
| 211 // share the same desktop workspace, which cancels the shelf status. | 212 // share the same desktop workspace, which cancels the shelf status. |
| 212 fullscreen->SetFullscreen(false); | 213 fullscreen->SetFullscreen(false); |
| 213 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow()); | 214 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow()); |
| 214 EXPECT_EQ("0,0 600x597", | 215 EXPECT_EQ("0,0 600x597", |
| 215 maximized->GetWindowBoundsInScreen().ToString()); | 216 maximized->GetWindowBoundsInScreen().ToString()); |
| 216 EXPECT_EQ("0,0 600x597", | 217 EXPECT_EQ("0,0 600x597", |
| 217 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); | 218 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); |
| 218 | 219 |
| (...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1049 keyboard_controller->ui()->GetKeyboardWindow()->SetBounds( | 1050 keyboard_controller->ui()->GetKeyboardWindow()->SetBounds( |
| 1050 gfx::Rect(0, 400, 800, 200)); | 1051 gfx::Rect(0, 400, 800, 200)); |
| 1051 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString()); | 1052 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString()); |
| 1052 | 1053 |
| 1053 UpdateDisplay("600x800"); | 1054 UpdateDisplay("600x800"); |
| 1054 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString()); | 1055 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString()); |
| 1055 } | 1056 } |
| 1056 | 1057 |
| 1057 } // namespace test | 1058 } // namespace test |
| 1058 } // namespace ash | 1059 } // namespace ash |
| OLD | NEW |