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

Unified Diff: ash/wm/workspace/snap_sizer_unittest.cc

Issue 161293003: Add test case for updating the bounds of snapped window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/window_util.cc ('k') | ash/wm/workspace/workspace_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/snap_sizer_unittest.cc
diff --git a/ash/wm/workspace/snap_sizer_unittest.cc b/ash/wm/workspace/snap_sizer_unittest.cc
index a86c4de6145c00f9b08078d1588e6a16228c8649..a75185fc7639a0ca40315a3de2b30117082e8b5f 100644
--- a/ash/wm/workspace/snap_sizer_unittest.cc
+++ b/ash/wm/workspace/snap_sizer_unittest.cc
@@ -323,6 +323,13 @@ TEST_F(SnapSizerTest, SingleSnapWindowWidth) {
sizer2.SnapWindowToTargetBounds();
expected.set_x(kWorkAreaBounds.x());
EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
+ EXPECT_EQ(wm::SHOW_TYPE_LEFT_SNAPPED, window_state->window_show_type());
+
+ // Setting bounds should keep the window snapped.
+ expected = kWorkAreaBounds;
+ expected.set_width(500);
+ window->SetBounds(gfx::Rect(10, 10, 500, 300));
+ EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
}
// Test that snapping left/right preserves the restore bounds.
« no previous file with comments | « ash/wm/window_util.cc ('k') | ash/wm/workspace/workspace_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698