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

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

Issue 11421006: Desktop aura: Break aura::Window::SetParent in two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ash_unittests Created 8 years 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.cc ('k') | ash/wm/workspace/workspace_layout_manager_unittest.cc » ('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_event_handler.h" 5 #include "ash/wm/workspace/workspace_event_handler.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ash/wm/property_util.h" 9 #include "ash/wm/property_util.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 13 matching lines...) Expand all
24 public: 24 public:
25 WorkspaceEventHandlerTest() {} 25 WorkspaceEventHandlerTest() {}
26 virtual ~WorkspaceEventHandlerTest() {} 26 virtual ~WorkspaceEventHandlerTest() {}
27 27
28 protected: 28 protected:
29 aura::Window* CreateTestWindow(aura::WindowDelegate* delegate, 29 aura::Window* CreateTestWindow(aura::WindowDelegate* delegate,
30 const gfx::Rect& bounds) { 30 const gfx::Rect& bounds) {
31 aura::Window* window = new aura::Window(delegate); 31 aura::Window* window = new aura::Window(delegate);
32 window->SetType(aura::client::WINDOW_TYPE_NORMAL); 32 window->SetType(aura::client::WINDOW_TYPE_NORMAL);
33 window->Init(ui::LAYER_TEXTURED); 33 window->Init(ui::LAYER_TEXTURED);
34 window->SetParent(NULL); 34 SetDefaultParentByPrimaryRootWindow(window);
35 window->SetBounds(bounds); 35 window->SetBounds(bounds);
36 window->Show(); 36 window->Show();
37 return window; 37 return window;
38 } 38 }
39 39
40 private: 40 private:
41 DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandlerTest); 41 DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandlerTest);
42 }; 42 };
43 43
44 TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) { 44 TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 wd.set_window_component(HTCAPTION); 168 wd.set_window_component(HTCAPTION);
169 169
170 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->parent())); 170 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->parent()));
171 MessageLoop::current()->DeleteSoon(FROM_HERE, window.get()); 171 MessageLoop::current()->DeleteSoon(FROM_HERE, window.get());
172 aura::client::GetWindowMoveClient(window->parent())->RunMoveLoop( 172 aura::client::GetWindowMoveClient(window->parent())->RunMoveLoop(
173 window.release(), gfx::Vector2d()); 173 window.release(), gfx::Vector2d());
174 } 174 }
175 175
176 } // namespace internal 176 } // namespace internal
177 } // namespace ash 177 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace.cc ('k') | ash/wm/workspace/workspace_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698