| Index: ash/wm/base_layout_manager_unittest.cc
|
| diff --git a/ash/wm/base_layout_manager_unittest.cc b/ash/wm/base_layout_manager_unittest.cc
|
| index e2525cc20c6a36ac86385ec09065d805c8447d22..e797c75670a40ed454844ad83427067044b7113a 100644
|
| --- a/ash/wm/base_layout_manager_unittest.cc
|
| +++ b/ash/wm/base_layout_manager_unittest.cc
|
| @@ -177,13 +177,12 @@ TEST_F(BaseLayoutManagerTest, BoundsWithScreenEdgeVisible) {
|
| EXPECT_EQ(max_bounds.ToString(), window->bounds().ToString());
|
| }
|
|
|
| -// Verifies maximizing always resets the restore bounds, and similarly restoring
|
| -// resets the restore bounds.
|
| -TEST_F(BaseLayoutManagerTest, MaximizeResetsRestoreBounds) {
|
| +// Verifies maximizing sets the restore bounds, and restoring
|
| +// restores the bounds.
|
| +TEST_F(BaseLayoutManagerTest, MaximizeSetsRestoreBounds) {
|
| scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(1, 2, 3, 4)));
|
| - SetRestoreBoundsInParent(window.get(), gfx::Rect(10, 11, 12, 13));
|
|
|
| - // Maximize it, which should reset restore bounds.
|
| + // Maximize it, which will keep the previous restore bounds.
|
| window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
|
| EXPECT_EQ("1,2 3x4", GetRestoreBoundsInParent(window.get()).ToString());
|
|
|
| @@ -193,6 +192,16 @@ TEST_F(BaseLayoutManagerTest, MaximizeResetsRestoreBounds) {
|
| EXPECT_TRUE(GetRestoreBoundsInScreen(window.get()) == NULL);
|
| }
|
|
|
| +// Verifies maximizing keeps the restore bounds if set.
|
| +TEST_F(BaseLayoutManagerTest, MaximizeResetsRestoreBounds) {
|
| + scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(1, 2, 3, 4)));
|
| + SetRestoreBoundsInParent(window.get(), gfx::Rect(10, 11, 12, 13));
|
| +
|
| + // Maximize it, which will keep the previous restore bounds.
|
| + window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
|
| + EXPECT_EQ("10,11 12x13", GetRestoreBoundsInParent(window.get()).ToString());
|
| +}
|
| +
|
| // Verifies that the restore bounds do not get reset when restoring to a
|
| // maximzied state from a minimized state.
|
| TEST_F(BaseLayoutManagerTest, BoundsAfterRestoringToMaximizeFromMinimize) {
|
|
|