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

Unified Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 68033003: Undocks window first before side-snapping bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undocks window first before side-snapping bounds (rebase) Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/wm/dock/docked_window_layout_manager.cc » ('j') | ash/wm/window_state.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller_unittest.cc
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index 4a98b0e0f0ade7aca79f3464030cec0c3ebefa10..de38a7f4bc4219a47e2145f6482bd0a4af1bf1a4 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -504,7 +504,7 @@ TEST_F(AcceleratorControllerTest, WindowSnap) {
EXPECT_EQ(window->bounds().ToString(), snap_right.ToString());
}
{
- gfx::Rect normal_bounds = window->bounds();
+ gfx::Rect normal_bounds = window_state->GetRestoreBoundsInParent();
GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
EXPECT_TRUE(window_state->IsMaximized());
@@ -512,6 +512,8 @@ TEST_F(AcceleratorControllerTest, WindowSnap) {
GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
EXPECT_FALSE(window_state->IsMaximized());
+ // Window gets restored to its restore bounds since side-maximized state
+ // is treated as a "maximized" state.
EXPECT_EQ(normal_bounds.ToString(), window->bounds().ToString());
GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
« no previous file with comments | « no previous file | ash/wm/dock/docked_window_layout_manager.cc » ('j') | ash/wm/window_state.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698