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

Unified Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 23471004: Only support left/right maximizing at 50% width when the --ash-enable-alternate-caption-button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
Index: ash/accelerators/accelerator_controller_unittest.cc
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index 4c00f72734149fb158380a5edab6b0ca8579c21d..cf796890390ae571bdeea573c1087ea87ae75d85 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -501,28 +501,12 @@ TEST_F(AcceleratorControllerTest, WindowSnap) {
wm::ActivateWindow(window.get());
{
+ gfx::Rect window_bounds = window->bounds();
GetController()->PerformAction(WINDOW_SNAP_LEFT, dummy);
- gfx::Rect snap_left = window->bounds();
- GetController()->PerformAction(WINDOW_SNAP_LEFT, dummy);
- EXPECT_NE(window->bounds().ToString(), snap_left.ToString());
- GetController()->PerformAction(WINDOW_SNAP_LEFT, dummy);
- EXPECT_NE(window->bounds().ToString(), snap_left.ToString());
-
- // It should cycle back to the first snapped position.
- GetController()->PerformAction(WINDOW_SNAP_LEFT, dummy);
- EXPECT_EQ(window->bounds().ToString(), snap_left.ToString());
- }
- {
- GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy);
- gfx::Rect snap_right = window->bounds();
- GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy);
- EXPECT_NE(window->bounds().ToString(), snap_right.ToString());
- GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy);
- EXPECT_NE(window->bounds().ToString(), snap_right.ToString());
-
- // It should cycle back to the first snapped position.
+ EXPECT_NE(window->bounds().ToString(), window_bounds.ToString());
Mr4D (OOO till 08-26) 2013/08/29 01:03:15 Could you do some more tests towards the result (e
+ window_bounds = window->bounds();
GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy);
- EXPECT_EQ(window->bounds().ToString(), snap_right.ToString());
+ EXPECT_NE(window->bounds().ToString(), window_bounds.ToString());
Mr4D (OOO till 08-26) 2013/08/29 01:03:15 Same here.
}
{
gfx::Rect normal_bounds = window->bounds();

Powered by Google App Engine
This is Rietveld 408576698