| 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/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
| 10 #include "ash/common/shell_window_ids.h" | 10 #include "ash/common/shell_window_ids.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 UpdateDisplay("600x600"); | 193 UpdateDisplay("600x600"); |
| 194 | 194 |
| 195 // d2 must have been deleted. | 195 // d2 must have been deleted. |
| 196 EXPECT_FALSE(tracker.Contains(d2)); | 196 EXPECT_FALSE(tracker.Contains(d2)); |
| 197 | 197 |
| 198 EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow()); | 198 EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow()); |
| 199 EXPECT_EQ("100,20 100x100", normal->GetWindowBoundsInScreen().ToString()); | 199 EXPECT_EQ("100,20 100x100", normal->GetWindowBoundsInScreen().ToString()); |
| 200 EXPECT_EQ("100,20 100x100", | 200 EXPECT_EQ("100,20 100x100", |
| 201 normal->GetNativeView()->GetBoundsInRootWindow().ToString()); | 201 normal->GetNativeView()->GetBoundsInRootWindow().ToString()); |
| 202 | 202 |
| 203 // Maximized area on primary display has 47px (ash::kShelfSize) inset at the | 203 // Maximized area on primary display has 47px for non-md and 48px for md |
| 204 // bottom. | 204 // (defined in ash::SHELF_SIZE) inset at the bottom. |
| 205 | 205 |
| 206 // First clear fullscreen status, since both fullscreen and maximized windows | 206 // First clear fullscreen status, since both fullscreen and maximized windows |
| 207 // share the same desktop workspace, which cancels the shelf status. | 207 // share the same desktop workspace, which cancels the shelf status. |
| 208 fullscreen->SetFullscreen(false); | 208 fullscreen->SetFullscreen(false); |
| 209 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow()); | 209 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow()); |
| 210 EXPECT_EQ("0,0 600x553", maximized->GetWindowBoundsInScreen().ToString()); | 210 EXPECT_EQ("0,0 600x553", maximized->GetWindowBoundsInScreen().ToString()); |
| 211 EXPECT_EQ("0,0 600x553", | 211 EXPECT_EQ("0,0 600x553", |
| 212 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); | 212 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); |
| 213 | 213 |
| 214 // Set fullscreen to true, but maximized window's size won't change because | 214 // Set fullscreen to true, but maximized window's size won't change because |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1046 keyboard_controller->ui()->GetKeyboardWindow()->SetBounds( | 1046 keyboard_controller->ui()->GetKeyboardWindow()->SetBounds( |
| 1047 gfx::Rect(0, 400, 800, 200)); | 1047 gfx::Rect(0, 400, 800, 200)); |
| 1048 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString()); | 1048 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString()); |
| 1049 | 1049 |
| 1050 UpdateDisplay("600x800"); | 1050 UpdateDisplay("600x800"); |
| 1051 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString()); | 1051 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString()); |
| 1052 } | 1052 } |
| 1053 | 1053 |
| 1054 } // namespace test | 1054 } // namespace test |
| 1055 } // namespace ash | 1055 } // namespace ash |
| OLD | NEW |