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

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

Issue 224113005: Eliminate ash::internal namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.cc ('k') | ash/wm/workspace_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ash_constants.h" 7 #include "ash/ash_constants.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 14 matching lines...) Expand all
25 #include "ui/aura/test/event_generator.h" 25 #include "ui/aura/test/event_generator.h"
26 #include "ui/aura/test/test_window_delegate.h" 26 #include "ui/aura/test/test_window_delegate.h"
27 #include "ui/aura/window_event_dispatcher.h" 27 #include "ui/aura/window_event_dispatcher.h"
28 #include "ui/base/hit_test.h" 28 #include "ui/base/hit_test.h"
29 #include "ui/events/gestures/gesture_configuration.h" 29 #include "ui/events/gestures/gesture_configuration.h"
30 #include "ui/gfx/insets.h" 30 #include "ui/gfx/insets.h"
31 #include "ui/gfx/screen.h" 31 #include "ui/gfx/screen.h"
32 #include "ui/views/widget/widget.h" 32 #include "ui/views/widget/widget.h"
33 33
34 namespace ash { 34 namespace ash {
35 namespace internal {
36 namespace { 35 namespace {
37 36
38 const int kRootHeight = 600; 37 const int kRootHeight = 600;
39 38
40 // A simple window delegate that returns the specified min size. 39 // A simple window delegate that returns the specified min size.
41 class TestWindowDelegate : public aura::test::TestWindowDelegate { 40 class TestWindowDelegate : public aura::test::TestWindowDelegate {
42 public: 41 public:
43 TestWindowDelegate() { 42 TestWindowDelegate() {
44 } 43 }
45 virtual ~TestWindowDelegate() {} 44 virtual ~TestWindowDelegate() {}
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 gfx::Point location = resizer.GetInitialLocation(); 175 gfx::Point location = resizer.GetInitialLocation();
177 location.set_x(location.x() + delta_x); 176 location.set_x(location.x() + delta_x);
178 location.set_y(location.y() + delta_y); 177 location.set_y(location.y() + delta_y);
179 return location; 178 return location;
180 } 179 }
181 180
182 std::vector<aura::Window*> empty_windows() const { 181 std::vector<aura::Window*> empty_windows() const {
183 return std::vector<aura::Window*>(); 182 return std::vector<aura::Window*>();
184 } 183 }
185 184
186 internal::ShelfLayoutManager* shelf_layout_manager() { 185 ShelfLayoutManager* shelf_layout_manager() {
187 return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); 186 return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
188 } 187 }
189 188
190 void InitTouchResizeWindow(const gfx::Rect& bounds, int window_component) { 189 void InitTouchResizeWindow(const gfx::Rect& bounds, int window_component) {
191 touch_resize_delegate_.set_window_component(window_component); 190 touch_resize_delegate_.set_window_component(window_component);
192 touch_resize_window_.reset( 191 touch_resize_window_.reset(
193 CreateTestWindowInShellWithDelegate(&touch_resize_delegate_, 0, 192 CreateTestWindowInShellWithDelegate(&touch_resize_delegate_, 0,
194 bounds)); 193 bounds));
195 } 194 }
196 195
(...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1867 touch_resize_window_->bounds().ToString()); 1866 touch_resize_window_->bounds().ToString());
1868 // Drag even more to snap to the edge. 1867 // Drag even more to snap to the edge.
1869 generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40), 1868 generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40),
1870 gfx::Point(400, kRootHeight - 25), 1869 gfx::Point(400, kRootHeight - 25),
1871 base::TimeDelta::FromMilliseconds(10), 1870 base::TimeDelta::FromMilliseconds(10),
1872 5); 1871 5);
1873 EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(), 1872 EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(),
1874 touch_resize_window_->bounds().ToString()); 1873 touch_resize_window_->bounds().ToString());
1875 } 1874 }
1876 1875
1877 } // namespace internal
1878 } // namespace ash 1876 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.cc ('k') | ash/wm/workspace_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698