OLD | NEW |
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 FocusWindowById(2); | 260 FocusWindowById(2); |
261 EXPECT_EQ(2, focused_window_id()); | 261 EXPECT_EQ(2, focused_window_id()); |
262 } | 262 } |
263 virtual void BasicActivation() OVERRIDE { | 263 virtual void BasicActivation() OVERRIDE { |
264 EXPECT_EQ(NULL, GetActiveWindow()); | 264 EXPECT_EQ(NULL, GetActiveWindow()); |
265 ActivateWindowById(1); | 265 ActivateWindowById(1); |
266 EXPECT_EQ(1, GetActiveWindowId()); | 266 EXPECT_EQ(1, GetActiveWindowId()); |
267 ActivateWindowById(2); | 267 ActivateWindowById(2); |
268 EXPECT_EQ(2, GetActiveWindowId()); | 268 EXPECT_EQ(2, GetActiveWindowId()); |
269 DeactivateWindow(GetActiveWindow()); | 269 DeactivateWindow(GetActiveWindow()); |
270 EXPECT_EQ(3, GetActiveWindowId()); | 270 EXPECT_EQ(1, GetActiveWindowId()); |
271 } | 271 } |
272 virtual void FocusEvents() OVERRIDE { | 272 virtual void FocusEvents() OVERRIDE { |
273 FocusEventsTestHandler handler(root_window()->GetChildById(1)); | 273 FocusEventsTestHandler handler(root_window()->GetChildById(1)); |
274 EXPECT_EQ(0, handler.GetCountForEventType( | 274 EXPECT_EQ(0, handler.GetCountForEventType( |
275 FocusChangeEvent::focus_changing_event_type())); | 275 FocusChangeEvent::focus_changing_event_type())); |
276 EXPECT_EQ(0, handler.GetCountForEventType( | 276 EXPECT_EQ(0, handler.GetCountForEventType( |
277 FocusChangeEvent::focus_changed_event_type())); | 277 FocusChangeEvent::focus_changed_event_type())); |
278 FocusWindowById(1); | 278 FocusWindowById(1); |
279 EXPECT_EQ(1, handler.GetCountForEventType( | 279 EXPECT_EQ(1, handler.GetCountForEventType( |
280 FocusChangeEvent::focus_changing_event_type())); | 280 FocusChangeEvent::focus_changing_event_type())); |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |