Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(770)

Side by Side Diff: ash/wm/lock_layout_manager_unittest.cc

Issue 2653593004: chromeos: Remove AshTestBase::SupportsMultipleDisplays (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/wm/immersive_fullscreen_controller_unittest.cc ('k') | ash/wm/maximize_mode/maximize_mode_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698