Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1721)

Unified Diff: ash/wm/panels/panel_layout_manager_unittest.cc

Issue 237963019: Remove remaining window states where window is shown with opacity 0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/panels/panel_layout_manager.cc ('k') | ash/wm/panels/panel_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6bf85b4c4603422b22ec5cf97c26c2c10135b9be 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
+ // Restore the panel; panel should not be activated by default but callout
// 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();
RunAllPendingInMessageLoop();
EXPECT_TRUE(w1->IsVisible());
EXPECT_FALSE(w2->IsVisible());
« no previous file with comments | « ash/wm/panels/panel_layout_manager.cc ('k') | ash/wm/panels/panel_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698