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

Unified Diff: ash/wm/workspace/workspace_manager_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/workspace/workspace_manager2_unittest.cc ('k') | chrome/browser/ui/ash/chrome_launcher_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_manager_unittest.cc
diff --git a/ash/wm/workspace/workspace_manager_unittest.cc b/ash/wm/workspace/workspace_manager_unittest.cc
index 69cfadd1dfce7a8647e524e4f404d10222b9b6ab..39f13aa8514dbccb4212632a96f6c4061dcb7ffa 100644
--- a/ash/wm/workspace/workspace_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_manager_unittest.cc
@@ -471,6 +471,7 @@ TEST_F(WorkspaceManagerTest, 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.
@@ -493,7 +494,7 @@ TEST_F(WorkspaceManagerTest, 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);
@@ -502,7 +503,7 @@ TEST_F(WorkspaceManagerTest, 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.
@@ -511,7 +512,7 @@ TEST_F(WorkspaceManagerTest, 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());
// Maximize again.
@@ -521,11 +522,11 @@ TEST_F(WorkspaceManagerTest, 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());
// 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.
@@ -539,7 +540,7 @@ TEST_F(WorkspaceManagerTest, ShelfStateUpdated) {
// Switch to w1.
w1->Show();
- 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.get()).ToString(),
w2->bounds().ToString());
« no previous file with comments | « ash/wm/workspace/workspace_manager2_unittest.cc ('k') | chrome/browser/ui/ash/chrome_launcher_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698