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

Side by Side Diff: ui/views/corewm/focus_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
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 "ui/views/corewm/focus_controller.h" 5 #include "ui/views/corewm/focus_controller.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "ui/aura/client/activation_client.h" 9 #include "ui/aura/client/activation_client.h"
10 #include "ui/aura/root_window.h" 10 #include "ui/aura/root_window.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // root_window 145 // root_window
146 // +-- w1 146 // +-- w1
147 // | +-- w11 147 // | +-- w11
148 // | +-- w12 148 // | +-- w12
149 // +-- w2 149 // +-- w2
150 // | +-- w21 150 // | +-- w21
151 // | +-- w211 151 // | +-- w211
152 // +-- w3 152 // +-- w3
153 aura::Window* w1 = aura::test::CreateTestWindowWithDelegate( 153 aura::Window* w1 = aura::test::CreateTestWindowWithDelegate(
154 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 1, 154 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 1,
155 gfx::Rect(0, 0, 50, 50), NULL); 155 gfx::Rect(0, 0, 50, 50), root_window());
156 aura::test::CreateTestWindowWithDelegate( 156 aura::test::CreateTestWindowWithDelegate(
157 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 11, 157 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 11,
158 gfx::Rect(5, 5, 10, 10), w1); 158 gfx::Rect(5, 5, 10, 10), w1);
159 aura::test::CreateTestWindowWithDelegate( 159 aura::test::CreateTestWindowWithDelegate(
160 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 12, 160 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 12,
161 gfx::Rect(15, 15, 10, 10), w1); 161 gfx::Rect(15, 15, 10, 10), w1);
162 aura::Window* w2 = aura::test::CreateTestWindowWithDelegate( 162 aura::Window* w2 = aura::test::CreateTestWindowWithDelegate(
163 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 2, 163 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 2,
164 gfx::Rect(75, 75, 50, 50), NULL); 164 gfx::Rect(75, 75, 50, 50), root_window());
165 aura::Window* w21 = aura::test::CreateTestWindowWithDelegate( 165 aura::Window* w21 = aura::test::CreateTestWindowWithDelegate(
166 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 21, 166 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 21,
167 gfx::Rect(5, 5, 10, 10), w2); 167 gfx::Rect(5, 5, 10, 10), w2);
168 aura::test::CreateTestWindowWithDelegate( 168 aura::test::CreateTestWindowWithDelegate(
169 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 211, 169 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 211,
170 gfx::Rect(1, 1, 5, 5), w21); 170 gfx::Rect(1, 1, 5, 5), w21);
171 aura::test::CreateTestWindowWithDelegate( 171 aura::test::CreateTestWindowWithDelegate(
172 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 3, 172 aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 3,
173 gfx::Rect(125, 125, 50, 50), NULL); 173 gfx::Rect(125, 125, 50, 50), root_window());
174 } 174 }
175 virtual void TearDown() OVERRIDE { 175 virtual void TearDown() OVERRIDE {
176 root_window()->RemovePreTargetHandler(focus_controller()); 176 root_window()->RemovePreTargetHandler(focus_controller());
177 aura::test::AuraTestBase::TearDown(); 177 aura::test::AuraTestBase::TearDown();
178 test_focus_rules_ = NULL; // Owned by FocusController. 178 test_focus_rules_ = NULL; // Owned by FocusController.
179 focus_controller_.reset(); 179 focus_controller_.reset();
180 } 180 }
181 181
182 FocusController* focus_controller() { return focus_controller_.get(); } 182 FocusController* focus_controller() { return focus_controller_.get(); }
183 aura::Window* focused_window() { return focus_controller_->focused_window(); } 183 aura::Window* focused_window() { return focus_controller_->focused_window(); }
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 DIRECT_FOCUS_CHANGE_TESTS(ShiftFocusToChildOfInactiveWindow); 725 DIRECT_FOCUS_CHANGE_TESTS(ShiftFocusToChildOfInactiveWindow);
726 726
727 // - Verifies that FocusRules determine what can be focused. 727 // - Verifies that FocusRules determine what can be focused.
728 ALL_FOCUS_TESTS(FocusRulesOverride); 728 ALL_FOCUS_TESTS(FocusRulesOverride);
729 729
730 // - Verifies that FocusRules determine what can be activated. 730 // - Verifies that FocusRules determine what can be activated.
731 TARGET_FOCUS_TESTS(ActivationRulesOverride); 731 TARGET_FOCUS_TESTS(ActivationRulesOverride);
732 732
733 } // namespace corewm 733 } // namespace corewm
734 } // namespace views 734 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/corewm/compound_event_filter_unittest.cc ('k') | ui/views/corewm/shadow_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698