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

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

Issue 2653593004: chromeos: Remove AshTestBase::SupportsMultipleDisplays (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « ash/wm/window_positioner_unittest.cc ('k') | ash/wm/window_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/material_design/material_design_controller.h" 9 #include "ash/common/material_design/material_design_controller.h"
10 #include "ash/common/wm/window_state.h" 10 #include "ash/common/wm/window_state.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 INSTANTIATE_TEST_CASE_P( 58 INSTANTIATE_TEST_CASE_P(
59 /* prefix intentionally left blank due to only one parameterization */, 59 /* prefix intentionally left blank due to only one parameterization */,
60 WindowStateTest, 60 WindowStateTest,
61 testing::Values(MaterialDesignController::NON_MATERIAL, 61 testing::Values(MaterialDesignController::NON_MATERIAL,
62 MaterialDesignController::MATERIAL_NORMAL, 62 MaterialDesignController::MATERIAL_NORMAL,
63 MaterialDesignController::MATERIAL_EXPERIMENTAL)); 63 MaterialDesignController::MATERIAL_EXPERIMENTAL));
64 64
65 // Test that a window gets properly snapped to the display's edges in a 65 // Test that a window gets properly snapped to the display's edges in a
66 // multi monitor environment. 66 // multi monitor environment.
67 TEST_P(WindowStateTest, SnapWindowBasic) { 67 TEST_P(WindowStateTest, SnapWindowBasic) {
68 if (!SupportsMultipleDisplays())
69 return;
70
71 UpdateDisplay("0+0-500x400, 0+500-600x400"); 68 UpdateDisplay("0+0-500x400, 0+500-600x400");
72 const gfx::Rect kPrimaryDisplayWorkAreaBounds = 69 const gfx::Rect kPrimaryDisplayWorkAreaBounds =
73 display::Screen::GetScreen()->GetPrimaryDisplay().work_area(); 70 display::Screen::GetScreen()->GetPrimaryDisplay().work_area();
74 const gfx::Rect kSecondaryDisplayWorkAreaBounds = 71 const gfx::Rect kSecondaryDisplayWorkAreaBounds =
75 display_manager()->GetSecondaryDisplay().work_area(); 72 display_manager()->GetSecondaryDisplay().work_area();
76 73
77 std::unique_ptr<aura::Window> window( 74 std::unique_ptr<aura::Window> window(
78 CreateTestWindowInShellWithBounds(gfx::Rect(100, 100, 100, 100))); 75 CreateTestWindowInShellWithBounds(gfx::Rect(100, 100, 100, 100)));
79 WindowState* window_state = GetWindowState(window.get()); 76 WindowState* window_state = GetWindowState(window.get());
80 const WMEvent snap_left(WM_EVENT_SNAP_LEFT); 77 const WMEvent snap_left(WM_EVENT_SNAP_LEFT);
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 // return to the state before minimizing and fullscreen. 467 // return to the state before minimizing and fullscreen.
471 ash::wm::ToggleFullScreen(window_state, nullptr); 468 ash::wm::ToggleFullScreen(window_state, nullptr);
472 ASSERT_TRUE(window_state->IsMaximized()); 469 ASSERT_TRUE(window_state->IsMaximized());
473 } 470 }
474 471
475 // TODO(skuhne): Add more unit test to verify the correctness for the restore 472 // TODO(skuhne): Add more unit test to verify the correctness for the restore
476 // operation. 473 // operation.
477 474
478 } // namespace wm 475 } // namespace wm
479 } // namespace ash 476 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_positioner_unittest.cc ('k') | ash/wm/window_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698