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

Side by Side Diff: ash/wm/dock/docked_window_resizer_unittest.cc

Issue 71653003: ash: Rename LauncherModel to ShelfModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chrome changes Created 7 years, 1 month 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/dock/docked_window_resizer.h" 5 #include "ash/wm/dock/docked_window_resizer.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/launcher/launcher.h" 8 #include "ash/launcher/launcher.h"
9 #include "ash/launcher/launcher_model.h"
10 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
11 #include "ash/screen_ash.h" 10 #include "ash/screen_ash.h"
12 #include "ash/shelf/shelf_layout_manager.h" 11 #include "ash/shelf/shelf_layout_manager.h"
12 #include "ash/shelf/shelf_model.h"
13 #include "ash/shelf/shelf_types.h" 13 #include "ash/shelf/shelf_types.h"
14 #include "ash/shelf/shelf_widget.h" 14 #include "ash/shelf/shelf_widget.h"
15 #include "ash/shell.h" 15 #include "ash/shell.h"
16 #include "ash/shell_window_ids.h" 16 #include "ash/shell_window_ids.h"
17 #include "ash/test/ash_test_base.h" 17 #include "ash/test/ash_test_base.h"
18 #include "ash/test/cursor_manager_test_api.h" 18 #include "ash/test/cursor_manager_test_api.h"
19 #include "ash/test/shell_test_api.h" 19 #include "ash/test/shell_test_api.h"
20 #include "ash/test/test_launcher_delegate.h" 20 #include "ash/test/test_launcher_delegate.h"
21 #include "ash/wm/coordinate_conversion.h" 21 #include "ash/wm/coordinate_conversion.h"
22 #include "ash/wm/dock/docked_window_layout_manager.h" 22 #include "ash/wm/dock/docked_window_layout_manager.h"
(...skipping 16 matching lines...) Expand all
39 : public test::AshTestBase, 39 : public test::AshTestBase,
40 public testing::WithParamInterface<aura::client::WindowType> { 40 public testing::WithParamInterface<aura::client::WindowType> {
41 public: 41 public:
42 DockedWindowResizerTest() : model_(NULL), window_type_(GetParam()) {} 42 DockedWindowResizerTest() : model_(NULL), window_type_(GetParam()) {}
43 virtual ~DockedWindowResizerTest() {} 43 virtual ~DockedWindowResizerTest() {}
44 44
45 virtual void SetUp() OVERRIDE { 45 virtual void SetUp() OVERRIDE {
46 AshTestBase::SetUp(); 46 AshTestBase::SetUp();
47 UpdateDisplay("600x400"); 47 UpdateDisplay("600x400");
48 test::ShellTestApi test_api(Shell::GetInstance()); 48 test::ShellTestApi test_api(Shell::GetInstance());
49 model_ = test_api.launcher_model(); 49 model_ = test_api.shelf_model();
50 } 50 }
51 51
52 virtual void TearDown() OVERRIDE { 52 virtual void TearDown() OVERRIDE {
53 AshTestBase::TearDown(); 53 AshTestBase::TearDown();
54 } 54 }
55 55
56 protected: 56 protected:
57 enum DockedEdge { 57 enum DockedEdge {
58 DOCKED_EDGE_NONE, 58 DOCKED_EDGE_NONE,
59 DOCKED_EDGE_LEFT, 59 DOCKED_EDGE_LEFT,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 bool test_panels() const { 213 bool test_panels() const {
214 return window_type_ == aura::client::WINDOW_TYPE_PANEL; 214 return window_type_ == aura::client::WINDOW_TYPE_PANEL;
215 } 215 }
216 216
217 const gfx::Point& initial_location_in_parent() const { 217 const gfx::Point& initial_location_in_parent() const {
218 return initial_location_in_parent_; 218 return initial_location_in_parent_;
219 } 219 }
220 220
221 private: 221 private:
222 scoped_ptr<WindowResizer> resizer_; 222 scoped_ptr<WindowResizer> resizer_;
223 LauncherModel* model_; 223 ShelfModel* model_;
224 aura::client::WindowType window_type_; 224 aura::client::WindowType window_type_;
225 aura::test::TestWindowDelegate delegate_; 225 aura::test::TestWindowDelegate delegate_;
226 226
227 // Location at start of the drag in |window->parent()|'s coordinates. 227 // Location at start of the drag in |window->parent()|'s coordinates.
228 gfx::Point initial_location_in_parent_; 228 gfx::Point initial_location_in_parent_;
229 229
230 DISALLOW_COPY_AND_ASSIGN(DockedWindowResizerTest); 230 DISALLOW_COPY_AND_ASSIGN(DockedWindowResizerTest);
231 }; 231 };
232 232
233 // Verifies a window can be dragged and attached to the dock. 233 // Verifies a window can be dragged and attached to the dock.
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 child->GetBoundsInScreen().origin().ToString()); 1229 child->GetBoundsInScreen().origin().ToString());
1230 } 1230 }
1231 1231
1232 // Tests run twice - on both panels and normal windows 1232 // Tests run twice - on both panels and normal windows
1233 INSTANTIATE_TEST_CASE_P(NormalOrPanel, 1233 INSTANTIATE_TEST_CASE_P(NormalOrPanel,
1234 DockedWindowResizerTest, 1234 DockedWindowResizerTest,
1235 testing::Values(aura::client::WINDOW_TYPE_NORMAL, 1235 testing::Values(aura::client::WINDOW_TYPE_NORMAL,
1236 aura::client::WINDOW_TYPE_PANEL)); 1236 aura::client::WINDOW_TYPE_PANEL));
1237 } // namespace internal 1237 } // namespace internal
1238 } // namespace ash 1238 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager_unittest.cc ('k') | ash/wm/panels/panel_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698