Chromium Code Reviews| 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 e0a63b0532bf030cf895924440a6b00f4cb22cba..2b54317737f47f285375af77b9fb65210dd2dfd4 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 { |
| @@ -260,5 +261,28 @@ TEST_F(PanelLayoutManagerTest, RemoveNonActivePanel) { |
| EXPECT_TRUE(WindowIsAbove(w2.get(), w3.get())); |
| } |
| +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()); |
| +} |
| + |
|
sky
2012/11/21 00:39:42
nit: remove one of these lines.
stevenjb
2012/11/29 02:30:38
Done.
|
| + |
| } // namespace internal |
| } // namespace ash |