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

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: rebase 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
« no previous file with comments | « 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 8c80687ebc1b65bf6581675bd92e21c34e41932b..929d552c65d4100582bc5f5a871b587f0e6cc4ae 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -450,7 +450,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(
@@ -1000,7 +1000,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());
« no previous file with comments | « ash/wm/workspace/snap_sizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698