| Index: ash/wm/panel_layout_manager_unittest.cc
|
| diff --git a/ash/wm/panel_layout_manager_unittest.cc b/ash/wm/panel_layout_manager_unittest.cc
|
| index 424fe0c13e3ac57e22ce3128e0b3e1944f6ca393..bbbbc92b08c49846cb4788c6e49e89425294e0c5 100644
|
| --- a/ash/wm/panel_layout_manager_unittest.cc
|
| +++ b/ash/wm/panel_layout_manager_unittest.cc
|
| @@ -15,8 +15,9 @@
|
| #include "base/basictypes.h"
|
| #include "base/command_line.h"
|
| #include "base/compiler_specific.h"
|
| -#include "ui/aura/window.h"
|
| +#include "ui/aura/client/aura_constants.h"
|
| #include "ui/aura/test/test_windows.h"
|
| +#include "ui/aura/window.h"
|
| #include "ui/views/widget/widget.h"
|
|
|
| namespace ash {
|
| @@ -297,5 +298,27 @@ TEST_F(PanelLayoutManagerTest, FanWindows) {
|
| EXPECT_GT(spacing, icon_x2 - icon_x1);
|
| }
|
|
|
| +TEST_F(PanelLayoutManagerTest, MinimizeRestorePanel) {
|
| + gfx::Rect bounds(0, 0, 201, 201);
|
| + scoped_ptr<aura::Window> window(CreatePanelWindow(bounds));
|
| + // Activate the window, ensure callout is visible.
|
| + wm::ActivateWindow(window.get());
|
| + RunAllPendingInMessageLoop();
|
| + EXPECT_TRUE(IsCalloutVisible());
|
| + // Minimize the panel, callout should be hidden.
|
| + window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
|
| + RunAllPendingInMessageLoop();
|
| + EXPECT_FALSE(IsCalloutVisible());
|
| + // Restore the pantel; panel should not be activated by default and callout
|
| + // should be hidden.
|
| + window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
|
| + RunAllPendingInMessageLoop();
|
| + EXPECT_FALSE(IsCalloutVisible());
|
| + // Activate the window, ensure callout is visible.
|
| + wm::ActivateWindow(window.get());
|
| + RunAllPendingInMessageLoop();
|
| + EXPECT_TRUE(IsCalloutVisible());
|
| +}
|
| +
|
| } // namespace internal
|
| } // namespace ash
|
|
|