Chromium Code Reviews| Index: ash/wm/panels/panel_layout_manager_unittest.cc |
| diff --git a/ash/wm/panels/panel_layout_manager_unittest.cc b/ash/wm/panels/panel_layout_manager_unittest.cc |
| index d32eb82922332e2e5baf736e53bcd4af8e8a1afe..f7d49473b92c38544ef54d7d640f6afda458be35 100644 |
| --- a/ash/wm/panels/panel_layout_manager_unittest.cc |
| +++ b/ash/wm/panels/panel_layout_manager_unittest.cc |
| @@ -23,6 +23,7 @@ |
| #include "ash/test/shell_test_api.h" |
| #include "ash/test/test_shelf_delegate.h" |
| #include "ash/wm/mru_window_tracker.h" |
| +#include "ash/wm/window_state.h" |
| #include "ash/wm/window_util.h" |
| #include "base/basictypes.h" |
| #include "base/command_line.h" |
| @@ -67,9 +68,6 @@ class PanelLayoutManagerTest : public test::AshTestBase { |
| test::TestShelfDelegate* shelf_delegate = |
| test::TestShelfDelegate::instance(); |
| shelf_delegate->AddShelfItem(window); |
| - PanelLayoutManager* manager = static_cast<PanelLayoutManager*>( |
| - GetPanelContainer(window)->layout_manager()); |
| - manager->Relayout(); |
| shelf_view_test()->RunMessageLoopUntilAnimationsDone(); |
| return window; |
| } |
| @@ -577,12 +575,12 @@ TEST_F(PanelLayoutManagerTest, MinimizeRestorePanel) { |
| RunAllPendingInMessageLoop(); |
| EXPECT_TRUE(IsPanelCalloutVisible(window.get())); |
| // Minimize the panel, callout should be hidden. |
| - window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); |
| + wm::GetWindowState(window.get())->Minimize(); |
| RunAllPendingInMessageLoop(); |
| EXPECT_FALSE(IsPanelCalloutVisible(window.get())); |
| // Restore the pantel; panel should not be activated by default but callout |
|
Mr4D (OOO till 08-26)
2014/04/22 14:45:54
pantel -> panel
flackr
2014/04/22 17:30:38
Done.
|
| // should be visible. |
| - window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
| + wm::GetWindowState(window.get())->Unminimize(); |
| RunAllPendingInMessageLoop(); |
| EXPECT_TRUE(IsPanelCalloutVisible(window.get())); |
| // Activate the window, ensure callout is visible. |
| @@ -750,7 +748,7 @@ TEST_F(PanelLayoutManagerTest, PanelsHideAndRestoreWithShelf) { |
| scoped_ptr<aura::Window> w2(CreatePanelWindow(bounds)); |
| scoped_ptr<aura::Window> w3; |
| // Minimize w2. |
| - w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); |
| + wm::GetWindowState(w2.get())->Minimize(); |
|
Mr4D (OOO till 08-26)
2014/04/22 14:45:54
Ah! Thanks for moving this to the new scheme!
|
| RunAllPendingInMessageLoop(); |
| EXPECT_TRUE(w1->IsVisible()); |
| EXPECT_FALSE(w2->IsVisible()); |