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/focus/focus_manager.h" | 5 #include "ui/views/focus/focus_manager.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <utility> | 9 #include <utility> |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
10 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/macros.h" |
11 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
12 #include "ui/base/accelerators/accelerator.h" | 15 #include "ui/base/accelerators/accelerator.h" |
13 #include "ui/events/keycodes/keyboard_codes.h" | 16 #include "ui/events/keycodes/keyboard_codes.h" |
14 #include "ui/views/accessible_pane_view.h" | 17 #include "ui/views/accessible_pane_view.h" |
15 #include "ui/views/controls/button/label_button.h" | 18 #include "ui/views/controls/button/label_button.h" |
16 #include "ui/views/focus/focus_manager_factory.h" | 19 #include "ui/views/focus/focus_manager_factory.h" |
17 #include "ui/views/focus/widget_focus_manager.h" | 20 #include "ui/views/focus/widget_focus_manager.h" |
18 #include "ui/views/test/focus_manager_test.h" | 21 #include "ui/views/test/focus_manager_test.h" |
19 #include "ui/views/test/widget_test.h" | 22 #include "ui/views/test/widget_test.h" |
20 #include "ui/views/widget/widget.h" | 23 #include "ui/views/widget/widget.h" |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 EXPECT_EQ(view1, GetFocusManager()->GetFocusedView()); | 874 EXPECT_EQ(view1, GetFocusManager()->GetFocusedView()); |
872 | 875 |
873 // Allow focus to go to the parent, and focus backwards which should now move | 876 // Allow focus to go to the parent, and focus backwards which should now move |
874 // up |widget_view| (in the parent). | 877 // up |widget_view| (in the parent). |
875 delegate->set_should_advance_focus_to_parent(true); | 878 delegate->set_should_advance_focus_to_parent(true); |
876 GetFocusManager()->AdvanceFocus(true); | 879 GetFocusManager()->AdvanceFocus(true); |
877 EXPECT_EQ(widget_view, GetFocusManager()->GetFocusedView()); | 880 EXPECT_EQ(widget_view, GetFocusManager()->GetFocusedView()); |
878 } | 881 } |
879 | 882 |
880 } // namespace views | 883 } // namespace views |
OLD | NEW |