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

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: Requested 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/wm/shelf_layout_manager_unittest.cc ('K') | « ash/wm/workspace/snap_sizer.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 6457d165ad20ed05455b5d977113f3c1aa8b4bee..4e5a34eebf4c485ae307d7cfbb979def511c5b2f 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -449,7 +449,7 @@ TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3_Compress) {
// Assertions around dragging to the left/right edge of the screen.
TEST_F(WorkspaceWindowResizerTest, Edge) {
int bottom =
- ScreenAsh::GetUnmaximizedWorkAreaBoundsInParent(window_.get()).bottom();
+ ScreenAsh::GetDisplayWorkAreaBoundsInParent(window_.get()).bottom();
window_->SetBounds(gfx::Rect(20, 30, 50, 60));
{
scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
@@ -939,7 +939,19 @@ 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_ALWAYS);
gfx::Rect 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());
+ Shell::GetInstance()->shelf()->SetAutoHideBehavior(
+ SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
+ rect = resizer->GetTargetBoundsForSize(0);
EXPECT_EQ("0,0 720x552", rect.ToString());
rect = resizer->GetTargetBoundsForSize(1);
EXPECT_EQ("0,0 720x552", rect.ToString());
« ash/wm/shelf_layout_manager_unittest.cc ('K') | « ash/wm/workspace/snap_sizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698