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

Side by Side Diff: ash/wm/workspace/workspace_layout_manager_unittest.cc

Issue 2370913002: Removes AshTestBase::SupportsHostWindowResize (Closed)
Patch Set: feedback Created 4 years, 2 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_state_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_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 (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/common/wm/workspace/workspace_layout_manager.h" 5 #include "ash/common/wm/workspace/workspace_layout_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/aura/wm_window_aura.h" 10 #include "ash/aura/wm_window_aura.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 // Create a popup window out of display boundaries and make sure it is not 166 // Create a popup window out of display boundaries and make sure it is not
167 // moved to have minimum visibility. 167 // moved to have minimum visibility.
168 std::unique_ptr<aura::Window> window( 168 std::unique_ptr<aura::Window> window(
169 CreateTestWindowInShellWithDelegateAndType( 169 CreateTestWindowInShellWithDelegateAndType(
170 nullptr, ui::wm::WINDOW_TYPE_POPUP, 0, gfx::Rect(400, 100, 50, 50))); 170 nullptr, ui::wm::WINDOW_TYPE_POPUP, 0, gfx::Rect(400, 100, 50, 50)));
171 EXPECT_EQ("400,100 50x50", window->GetBoundsInScreen().ToString()); 171 EXPECT_EQ("400,100 50x50", window->GetBoundsInScreen().ToString());
172 } 172 }
173 173
174 TEST_F(WorkspaceLayoutManagerTest, KeepRestoredWindowInDisplay) { 174 TEST_F(WorkspaceLayoutManagerTest, KeepRestoredWindowInDisplay) {
175 if (!SupportsHostWindowResize())
176 return;
177 std::unique_ptr<aura::Window> window( 175 std::unique_ptr<aura::Window> window(
178 CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 30, 40))); 176 CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 30, 40)));
179 wm::WindowState* window_state = wm::GetWindowState(window.get()); 177 wm::WindowState* window_state = wm::GetWindowState(window.get());
180 178
181 // Maximized -> Normal transition. 179 // Maximized -> Normal transition.
182 window_state->Maximize(); 180 window_state->Maximize();
183 window_state->SetRestoreBoundsInScreen(gfx::Rect(-100, -100, 30, 40)); 181 window_state->SetRestoreBoundsInScreen(gfx::Rect(-100, -100, 30, 40));
184 window_state->Restore(); 182 window_state->Restore();
185 EXPECT_TRUE( 183 EXPECT_TRUE(
186 Shell::GetPrimaryRootWindow()->bounds().Intersects(window->bounds())); 184 Shell::GetPrimaryRootWindow()->bounds().Intersects(window->bounds()));
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 changed_window_bounds.Offset(0, -shift); 1307 changed_window_bounds.Offset(0, -shift);
1310 // Window should be shifted up. 1308 // Window should be shifted up.
1311 EXPECT_EQ(changed_window_bounds, window->bounds()); 1309 EXPECT_EQ(changed_window_bounds, window->bounds());
1312 1310
1313 kb_controller->HideKeyboard( 1311 kb_controller->HideKeyboard(
1314 keyboard::KeyboardController::HIDE_REASON_AUTOMATIC); 1312 keyboard::KeyboardController::HIDE_REASON_AUTOMATIC);
1315 EXPECT_EQ(orig_window_bounds, window->bounds()); 1313 EXPECT_EQ(orig_window_bounds, window->bounds());
1316 } 1314 }
1317 1315
1318 } // namespace ash 1316 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_state_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698