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

Side by Side Diff: ash/wm/drag_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/drag_window_resizer.h" 5 #include "ash/wm/drag_window_resizer.h"
6 6
7 #include "ash/display/mouse_cursor_event_filter.h" 7 #include "ash/display/mouse_cursor_event_filter.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 19 matching lines...) Expand all
30 30
31 } // namespace 31 } // namespace
32 32
33 class DragWindowResizerTest : public test::AshTestBase { 33 class DragWindowResizerTest : public test::AshTestBase {
34 public: 34 public:
35 DragWindowResizerTest() : window_(NULL) {} 35 DragWindowResizerTest() : window_(NULL) {}
36 virtual ~DragWindowResizerTest() {} 36 virtual ~DragWindowResizerTest() {}
37 37
38 virtual void SetUp() OVERRIDE { 38 virtual void SetUp() OVERRIDE {
39 AshTestBase::SetUp(); 39 AshTestBase::SetUp();
40 UpdateDisplay(StringPrintf("800x%d", kRootHeight)); 40 UpdateDisplay(base::StringPrintf("800x%d", kRootHeight));
41 41
42 aura::RootWindow* root = Shell::GetPrimaryRootWindow(); 42 aura::RootWindow* root = Shell::GetPrimaryRootWindow();
43 gfx::Rect root_bounds(root->bounds()); 43 gfx::Rect root_bounds(root->bounds());
44 EXPECT_EQ(kRootHeight, root_bounds.height()); 44 EXPECT_EQ(kRootHeight, root_bounds.height());
45 EXPECT_EQ(800, root_bounds.width()); 45 EXPECT_EQ(800, root_bounds.width());
46 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); 46 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
47 window_.reset(new aura::Window(&delegate_)); 47 window_.reset(new aura::Window(&delegate_));
48 window_->SetType(aura::client::WINDOW_TYPE_NORMAL); 48 window_->SetType(aura::client::WINDOW_TYPE_NORMAL);
49 window_->Init(ui::LAYER_NOT_DRAWN); 49 window_->Init(ui::LAYER_NOT_DRAWN);
50 SetDefaultParentByPrimaryRootWindow(window_.get()); 50 SetDefaultParentByPrimaryRootWindow(window_.get());
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 ASSERT_TRUE(resizer.get()); 475 ASSERT_TRUE(resizer.get());
476 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0); 476 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
477 EXPECT_TRUE(event_filter->WarpMouseCursorIfNecessary(root_windows[0], 477 EXPECT_TRUE(event_filter->WarpMouseCursorIfNecessary(root_windows[0],
478 gfx::Point(399, 200))); 478 gfx::Point(399, 200)));
479 resizer->CompleteDrag(0); 479 resizer->CompleteDrag(0);
480 } 480 }
481 } 481 }
482 482
483 } // namespace internal 483 } // namespace internal
484 } // namespace ash 484 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698