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

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

Issue 10979090: Simplify WorkAreaBounds access logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: temp changes Created 8 years, 2 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
« ash/screen_ash.cc ('K') | « ash/wm/shelf_layout_manager_unittest.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_window_resizer_unittest.cc
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc
index 67f29fb2fb1c290940c0a9dc4c69c1270027e64d..0afdf3ed7e87b5a182c32846e1fe59d06601638d 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -939,6 +939,8 @@ TEST_F(WorkspaceWindowResizerTest, TestProperSizerResolutions) {
scoped_ptr<SnapSizer> resizer(new SnapSizer(
window_.get(), gfx::Point(), SnapSizer::LEFT_EDGE));
ASSERT_TRUE(resizer.get());
+ Shell::GetInstance()->shelf()->SetAutoHideBehavior(
+ SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
gfx::Rect rect = resizer->GetTargetBoundsForSize(0);
EXPECT_EQ("0,0 720x552", rect.ToString());
rect = resizer->GetTargetBoundsForSize(1);
@@ -947,6 +949,16 @@ TEST_F(WorkspaceWindowResizerTest, TestProperSizerResolutions) {
EXPECT_EQ("0,0 720x552", rect.ToString());
rect = resizer->GetTargetBoundsForSize(3);
EXPECT_EQ("0,0 640x552", rect.ToString());
+ Shell::GetInstance()->shelf()->SetAutoHideBehavior(
+ SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
+ rect = resizer->GetTargetBoundsForSize(0);
+ EXPECT_EQ("0,0 720x597", rect.ToString());
+ rect = resizer->GetTargetBoundsForSize(1);
+ EXPECT_EQ("0,0 720x597", rect.ToString());
+ rect = resizer->GetTargetBoundsForSize(2);
+ EXPECT_EQ("0,0 720x597", rect.ToString());
+ rect = resizer->GetTargetBoundsForSize(3);
+ EXPECT_EQ("0,0 640x597", rect.ToString());
}
// Verifies that a dragged window will restore to its pre-maximized size.
« ash/screen_ash.cc ('K') | « ash/wm/shelf_layout_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698