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..b9de4cd35ffb0d5f47822fdcec76b3b6e5aa9a7a 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,27 @@ TEST_F(PanelLayoutManagerTest, RemoveNonActivePanel) { |
| EXPECT_TRUE(WindowIsAbove(w2.get(), w3.get())); |
| } |
| +TEST_F(PanelLayoutManagerTest, MinimizeRestorePanel) { |
|
James Cook
2012/11/29 16:52:01
Thanks for adding a test!
|
| + 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 |