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

Unified Diff: ash/wm/workspace/workspace_manager2_unittest.cc

Issue 10987005: Autohide behavior simplified to always/never (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/shelf_types.h ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_manager2_unittest.cc
diff --git a/ash/wm/workspace/workspace_manager2_unittest.cc b/ash/wm/workspace/workspace_manager2_unittest.cc
index 5a109b315cfbe1c5ca2e0cb6804328937a4b1dc2..10ac7447288745ac775ab405952106139211c4cb 100644
--- a/ash/wm/workspace/workspace_manager2_unittest.cc
+++ b/ash/wm/workspace/workspace_manager2_unittest.cc
@@ -461,6 +461,7 @@ TEST_F(WorkspaceManager2Test, ShelfStateUpdated) {
scoped_ptr<Window> w1(CreateTestWindow());
const gfx::Rect w1_bounds(0, 1, 101, 102);
ShelfLayoutManager* shelf = Shell::GetInstance()->shelf();
+ shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
const gfx::Rect touches_shelf_bounds(
0, shelf->GetIdealBounds().y() - 10, 101, 102);
// Move |w1| to overlap the shelf.
@@ -483,7 +484,7 @@ TEST_F(WorkspaceManager2Test, ShelfStateUpdated) {
w1->Show();
wm::ActivateWindow(w1.get());
- EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
+ EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE, shelf->visibility_state());
// Maximize the window.
w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
@@ -492,7 +493,7 @@ TEST_F(WorkspaceManager2Test, ShelfStateUpdated) {
// Restore.
w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
+ EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE, shelf->visibility_state());
EXPECT_EQ("0,1 101x102", w1->bounds().ToString());
// Fullscreen.
@@ -501,7 +502,7 @@ TEST_F(WorkspaceManager2Test, ShelfStateUpdated) {
// Normal.
w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
+ EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE, shelf->visibility_state());
EXPECT_EQ("0,1 101x102", w1->bounds().ToString());
EXPECT_FALSE(GetWindowOverlapsShelf());
@@ -520,7 +521,7 @@ TEST_F(WorkspaceManager2Test, ShelfStateUpdated) {
// Minimize.
w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
+ EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE, shelf->visibility_state());
// Since the restore from minimize will restore to the pre-minimize
// state (tested elsewhere), we abandon the current size and restore
@@ -533,7 +534,7 @@ TEST_F(WorkspaceManager2Test, ShelfStateUpdated) {
// Restore.
w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
+ EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE, shelf->visibility_state());
EXPECT_EQ("0,1 101x102", w1->bounds().ToString());
// Create another window, maximized.
@@ -550,7 +551,7 @@ TEST_F(WorkspaceManager2Test, ShelfStateUpdated) {
// Switch to w1.
wm::ActivateWindow(w1.get());
EXPECT_EQ(0, active_index());
- EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
+ EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE, shelf->visibility_state());
EXPECT_EQ("0,1 101x102", w1->bounds().ToString());
EXPECT_EQ(ScreenAsh::GetMaximizedWindowBoundsInParent(
w2->parent()).ToString(),
« no previous file with comments | « ash/wm/shelf_types.h ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698