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

Side by Side Diff: ash/wm/toplevel_window_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/shelf_layout_manager_unittest.cc ('k') | ash/wm/user_activity_detector_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/toplevel_window_event_handler.h" 5 #include "ash/wm/toplevel_window_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/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "ash/wm/workspace/snap_sizer.h" 10 #include "ash/wm/workspace/snap_sizer.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 parent_ = NULL; 86 parent_ = NULL;
87 AshTestBase::TearDown(); 87 AshTestBase::TearDown();
88 } 88 }
89 89
90 protected: 90 protected:
91 aura::Window* CreateWindow(int hittest_code) { 91 aura::Window* CreateWindow(int hittest_code) {
92 TestWindowDelegate* d1 = new TestWindowDelegate(hittest_code); 92 TestWindowDelegate* d1 = new TestWindowDelegate(hittest_code);
93 aura::Window* w1 = new aura::Window(d1); 93 aura::Window* w1 = new aura::Window(d1);
94 w1->set_id(1); 94 w1->set_id(1);
95 w1->Init(ui::LAYER_TEXTURED); 95 w1->Init(ui::LAYER_TEXTURED);
96 w1->SetParent(parent_); 96 parent_->AddChild(w1);
97 w1->SetBounds(gfx::Rect(0, 0, 100, 100)); 97 w1->SetBounds(gfx::Rect(0, 0, 100, 100));
98 w1->Show(); 98 w1->Show();
99 return w1; 99 return w1;
100 } 100 }
101 101
102 void DragFromCenterBy(aura::Window* window, int dx, int dy) { 102 void DragFromCenterBy(aura::Window* window, int dx, int dy) {
103 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window); 103 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window);
104 generator.DragMouseBy(dx, dy); 104 generator.DragMouseBy(dx, dy);
105 } 105 }
106 106
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 528
529 generator.PressLeftButton(); 529 generator.PressLeftButton();
530 generator.MoveMouseBy(10, 11); 530 generator.MoveMouseBy(10, 11);
531 RunAllPendingInMessageLoop(); 531 RunAllPendingInMessageLoop();
532 EXPECT_EQ("10,11 100x100", target->bounds().ToString()); 532 EXPECT_EQ("10,11 100x100", target->bounds().ToString());
533 } 533 }
534 } 534 }
535 535
536 } // namespace test 536 } // namespace test
537 } // namespace ash 537 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/shelf_layout_manager_unittest.cc ('k') | ash/wm/user_activity_detector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698