| Index: ash/shelf/shelf_layout_manager_unittest.cc
|
| diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
|
| index 15bab6409c158c53fc93266915d8ca2331141432..fd308bafaf360c80a44665815feaf4edbb41693a 100644
|
| --- a/ash/shelf/shelf_layout_manager_unittest.cc
|
| +++ b/ash/shelf/shelf_layout_manager_unittest.cc
|
| @@ -1363,34 +1363,27 @@ TEST_F(ShelfLayoutManagerTest, WorkAreaChangeWorkspace) {
|
| // Both windows are maximized. They should be of the same size.
|
| EXPECT_EQ(widget_one->GetNativeWindow()->bounds().ToString(),
|
| widget_two->GetNativeWindow()->bounds().ToString());
|
| + int area_when_shelf_shown =
|
| + widget_one->GetNativeWindow()->bounds().size().GetArea();
|
|
|
| // Now hide the shelf.
|
| shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
|
|
|
| - // The active maximized window will get resized to the new work area. However,
|
| - // the inactive window should not get resized.
|
| - EXPECT_NE(widget_one->GetNativeWindow()->bounds().ToString(),
|
| - widget_two->GetNativeWindow()->bounds().ToString());
|
| -
|
| - // Activate the first window. Now, both windows should be of the same size
|
| - // again.
|
| - widget_one->Activate();
|
| + // Both windows should be resized according to the shelf status.
|
| EXPECT_EQ(widget_one->GetNativeWindow()->bounds().ToString(),
|
| widget_two->GetNativeWindow()->bounds().ToString());
|
| + // Resized to small.
|
| + EXPECT_LT(area_when_shelf_shown,
|
| + widget_one->GetNativeWindow()->bounds().size().GetArea());
|
|
|
| // Now show the shelf.
|
| shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
|
|
|
| - // The active maximized window will get resized to the new work area. However,
|
| - // the inactive window should not get resized.
|
| - EXPECT_NE(widget_one->GetNativeWindow()->bounds().ToString(),
|
| - widget_two->GetNativeWindow()->bounds().ToString());
|
| -
|
| - // Activate the first window. Now, both windows should be of the same size
|
| - // again.
|
| - widget_two->Activate();
|
| + // Again both windows should be of the same size.
|
| EXPECT_EQ(widget_one->GetNativeWindow()->bounds().ToString(),
|
| widget_two->GetNativeWindow()->bounds().ToString());
|
| + EXPECT_EQ(area_when_shelf_shown,
|
| + widget_one->GetNativeWindow()->bounds().size().GetArea());
|
| }
|
|
|
| // Confirm that the shelf is dimmed only when content is maximized and
|
|
|