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

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 (comments) 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/caption_buttons/frame_maximize_button.cc » ('j') | no next file with comments »
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 ce3476b888b112b01c19f5c5ef158e7764dc5229..8569171ca45d006d7066c931e666bd32c3ae8d78 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -505,7 +505,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());
@@ -513,6 +513,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/caption_buttons/frame_maximize_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698