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

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

Issue 10874086: Makes sure shelf visibility is updated when the visibility of a window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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.cc ('k') | no next file » | 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 47f51b23b47e1fa52cc963084c50e647b44c14c3..825cda317507c6a0dba8349f96a39c11d2028a4e 100644
--- a/ash/wm/workspace/workspace_manager2_unittest.cc
+++ b/ash/wm/workspace/workspace_manager2_unittest.cc
@@ -461,12 +461,22 @@ TEST_F(WorkspaceManager2Test, ShelfStateUpdated) {
scoped_ptr<Window> w1(CreateTestWindow());
const gfx::Rect w1_bounds(0, 1, 101, 102);
+ ShelfLayoutManager* shelf = Shell::GetInstance()->shelf();
+ const gfx::Rect touches_shelf_bounds(
+ 0, shelf->GetIdealBounds().y() - 10, 101, 102);
+ // Move |w1| to overlap the shelf.
+ w1->SetBounds(touches_shelf_bounds);
+ EXPECT_FALSE(GetWindowOverlapsShelf());
+
+ // Make it visible, since visible shelf overlaps should be true.
+ w1->Show();
+ EXPECT_TRUE(GetWindowOverlapsShelf());
+
+ wm::ActivateWindow(w1.get());
w1->SetBounds(w1_bounds);
w1->Show();
wm::ActivateWindow(w1.get());
- ShelfLayoutManager* shelf = Shell::GetInstance()->shelf();
-
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
// Maximize the window.
@@ -490,8 +500,6 @@ TEST_F(WorkspaceManager2Test, ShelfStateUpdated) {
EXPECT_FALSE(GetWindowOverlapsShelf());
// Move window so it obscures shelf.
- const gfx::Rect touches_shelf_bounds(
- 0, shelf->GetIdealBounds().y() - 10, 101, 102);
w1->SetBounds(touches_shelf_bounds);
EXPECT_TRUE(GetWindowOverlapsShelf());
« no previous file with comments | « ash/wm/workspace/workspace_manager2.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698