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

Side by Side Diff: ash/wm/workspace/workspace_window_resizer_unittest.cc

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/workspace/workspace_window_resizer.h" 5 #include "ash/wm/workspace/workspace_window_resizer.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/screen_ash.h" 9 #include "ash/screen_ash.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 DISALLOW_COPY_AND_ASSIGN(TestWindowDelegate); 63 DISALLOW_COPY_AND_ASSIGN(TestWindowDelegate);
64 }; 64 };
65 65
66 class WorkspaceWindowResizerTest : public test::AshTestBase { 66 class WorkspaceWindowResizerTest : public test::AshTestBase {
67 public: 67 public:
68 WorkspaceWindowResizerTest() : window_(NULL) {} 68 WorkspaceWindowResizerTest() : window_(NULL) {}
69 virtual ~WorkspaceWindowResizerTest() {} 69 virtual ~WorkspaceWindowResizerTest() {}
70 70
71 virtual void SetUp() OVERRIDE { 71 virtual void SetUp() OVERRIDE {
72 AshTestBase::SetUp(); 72 AshTestBase::SetUp();
73 UpdateDisplay(StringPrintf("800x%d", kRootHeight)); 73 UpdateDisplay(base::StringPrintf("800x%d", kRootHeight));
74 74
75 aura::RootWindow* root = Shell::GetPrimaryRootWindow(); 75 aura::RootWindow* root = Shell::GetPrimaryRootWindow();
76 gfx::Rect root_bounds(root->bounds()); 76 gfx::Rect root_bounds(root->bounds());
77 #if defined(OS_WIN) 77 #if defined(OS_WIN)
78 // RootWindow and Display can't resize on Windows Ash. 78 // RootWindow and Display can't resize on Windows Ash.
79 // http://crbug.com/165962 79 // http://crbug.com/165962
80 EXPECT_EQ(kRootHeight, root_bounds.height()); 80 EXPECT_EQ(kRootHeight, root_bounds.height());
81 #endif 81 #endif
82 EXPECT_EQ(800, root_bounds.width()); 82 EXPECT_EQ(800, root_bounds.width());
83 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); 83 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 ASSERT_TRUE(resizer.get()); 1486 ASSERT_TRUE(resizer.get());
1487 // Move it 50 to the left, which should contract w1 and expand w2-3. 1487 // Move it 50 to the left, which should contract w1 and expand w2-3.
1488 resizer->Drag(CalculateDragPoint(*resizer, -50, 0), 0); 1488 resizer->Drag(CalculateDragPoint(*resizer, -50, 0), 0);
1489 EXPECT_EQ("100,100 98x100", window_->bounds().ToString()); 1489 EXPECT_EQ("100,100 98x100", window_->bounds().ToString());
1490 EXPECT_EQ("198,100 101x100", window2_->bounds().ToString()); 1490 EXPECT_EQ("198,100 101x100", window2_->bounds().ToString());
1491 EXPECT_EQ("299,100 101x100", window3_->bounds().ToString()); 1491 EXPECT_EQ("299,100 101x100", window3_->bounds().ToString());
1492 } 1492 }
1493 1493
1494 } // namespace internal 1494 } // namespace internal
1495 } // namespace ash 1495 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698