| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/window_state.h" | 5 #include "ash/common/wm/window_state.h" |
| 6 #include "ash/public/cpp/shell_window_ids.h" | 6 #include "ash/public/cpp/shell_window_ids.h" |
| 7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 target_bounds.height() - | 237 target_bounds.height() - |
| 238 keyboard->ui()->GetKeyboardWindow()->bounds().height()); | 238 keyboard->ui()->GetKeyboardWindow()->bounds().height()); |
| 239 EXPECT_EQ(target_bounds.ToString(), window->GetBoundsInScreen().ToString()); | 239 EXPECT_EQ(target_bounds.ToString(), window->GetBoundsInScreen().ToString()); |
| 240 ShowKeyboard(false); | 240 ShowKeyboard(false); |
| 241 | 241 |
| 242 keyboard::SetKeyboardOverscrollOverride( | 242 keyboard::SetKeyboardOverscrollOverride( |
| 243 keyboard::KEYBOARD_OVERSCROLL_OVERRIDE_NONE); | 243 keyboard::KEYBOARD_OVERSCROLL_OVERRIDE_NONE); |
| 244 } | 244 } |
| 245 | 245 |
| 246 TEST_F(LockLayoutManagerTest, MultipleMonitors) { | 246 TEST_F(LockLayoutManagerTest, MultipleMonitors) { |
| 247 if (!SupportsMultipleDisplays()) | |
| 248 return; | |
| 249 | |
| 250 UpdateDisplay("300x400,400x500"); | 247 UpdateDisplay("300x400,400x500"); |
| 251 gfx::Rect screen_bounds = | 248 gfx::Rect screen_bounds = |
| 252 display::Screen::GetScreen()->GetPrimaryDisplay().bounds(); | 249 display::Screen::GetScreen()->GetPrimaryDisplay().bounds(); |
| 253 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); | 250 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); |
| 254 | 251 |
| 255 views::Widget::InitParams widget_params( | 252 views::Widget::InitParams widget_params( |
| 256 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 253 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
| 257 widget_params.show_state = ui::SHOW_STATE_FULLSCREEN; | 254 widget_params.show_state = ui::SHOW_STATE_FULLSCREEN; |
| 258 std::unique_ptr<aura::Window> window( | 255 std::unique_ptr<aura::Window> window( |
| 259 CreateTestLoginWindow(widget_params, false /* use_delegate */)); | 256 CreateTestLoginWindow(widget_params, false /* use_delegate */)); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 290 ScreenUtil::GetDisplayWorkAreaBoundsInParent(window.get()); | 287 ScreenUtil::GetDisplayWorkAreaBoundsInParent(window.get()); |
| 291 window->SetBounds(work_area); | 288 window->SetBounds(work_area); |
| 292 // Usually work_area takes Shelf into account but that doesn't affect | 289 // Usually work_area takes Shelf into account but that doesn't affect |
| 293 // LockScreen container windows. | 290 // LockScreen container windows. |
| 294 EXPECT_NE(work_area.ToString(), window->GetBoundsInScreen().ToString()); | 291 EXPECT_NE(work_area.ToString(), window->GetBoundsInScreen().ToString()); |
| 295 EXPECT_EQ(screen_bounds.ToString(), window->GetBoundsInScreen().ToString()); | 292 EXPECT_EQ(screen_bounds.ToString(), window->GetBoundsInScreen().ToString()); |
| 296 } | 293 } |
| 297 | 294 |
| 298 } // namespace test | 295 } // namespace test |
| 299 } // namespace ash | 296 } // namespace ash |
| OLD | NEW |