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

Side by Side Diff: ash/wm/workspace/multi_window_resize_controller_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/window_modality_controller_unittest.cc ('k') | ash/wm/workspace/workspace.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/multi_window_resize_controller.h" 5 #include "ash/wm/workspace/multi_window_resize_controller.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/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "ash/wm/workspace_controller.h" 10 #include "ash/wm/workspace_controller.h"
(...skipping 23 matching lines...) Expand all
34 resize_controller_ = WorkspaceEventHandlerTestHelper(event_handler). 34 resize_controller_ = WorkspaceEventHandlerTestHelper(event_handler).
35 resize_controller(); 35 resize_controller();
36 } 36 }
37 37
38 protected: 38 protected:
39 aura::Window* CreateTestWindow(aura::WindowDelegate* delegate, 39 aura::Window* CreateTestWindow(aura::WindowDelegate* delegate,
40 const gfx::Rect& bounds) { 40 const gfx::Rect& bounds) {
41 aura::Window* window = new aura::Window(delegate); 41 aura::Window* window = new aura::Window(delegate);
42 window->SetType(aura::client::WINDOW_TYPE_NORMAL); 42 window->SetType(aura::client::WINDOW_TYPE_NORMAL);
43 window->Init(ui::LAYER_TEXTURED); 43 window->Init(ui::LAYER_TEXTURED);
44 window->SetParent(NULL); 44 SetDefaultParentByPrimaryRootWindow(window);
45 window->SetBounds(bounds); 45 window->SetBounds(bounds);
46 window->Show(); 46 window->Show();
47 return window; 47 return window;
48 } 48 }
49 49
50 void ShowNow() { 50 void ShowNow() {
51 resize_controller_->ShowNow(); 51 resize_controller_->ShowNow();
52 } 52 }
53 53
54 bool IsShowing() { 54 bool IsShowing() {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 EXPECT_TRUE(HasTarget(w3.get())); 248 EXPECT_TRUE(HasTarget(w3.get()));
249 249
250 // Release the mouse. The resizer should still be visible and a subsequent 250 // Release the mouse. The resizer should still be visible and a subsequent
251 // press should not trigger a DCHECK. 251 // press should not trigger a DCHECK.
252 generator.ReleaseLeftButton(); 252 generator.ReleaseLeftButton();
253 EXPECT_TRUE(IsShowing()); 253 EXPECT_TRUE(IsShowing());
254 generator.PressLeftButton(); 254 generator.PressLeftButton();
255 } 255 }
256 } // namespace internal 256 } // namespace internal
257 } // namespace ash 257 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_modality_controller_unittest.cc ('k') | ash/wm/workspace/workspace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698