| Index: ui/views/focus/focus_manager_unittest.cc
|
| diff --git a/ui/views/focus/focus_manager_unittest.cc b/ui/views/focus/focus_manager_unittest.cc
|
| index 01b41dd6e1dc89692e309010f1e9cc0ccf422e16..0566ff53df7289c329206f481151c363e406a358 100644
|
| --- a/ui/views/focus/focus_manager_unittest.cc
|
| +++ b/ui/views/focus/focus_manager_unittest.cc
|
| @@ -43,7 +43,7 @@ class SimpleTestView : public View {
|
| public:
|
| SimpleTestView(std::vector<FocusTestEvent>* event_list, int view_id)
|
| : event_list_(event_list) {
|
| - SetFocusable(true);
|
| + SetFocusBehavior(FocusBehavior::ALWAYS);
|
| set_id(view_id);
|
| }
|
|
|
| @@ -95,9 +95,9 @@ TEST_F(FocusManagerTest, ViewFocusCallbacks) {
|
|
|
| TEST_F(FocusManagerTest, FocusChangeListener) {
|
| View* view1 = new View();
|
| - view1->SetFocusable(true);
|
| + view1->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| View* view2 = new View();
|
| - view2->SetFocusable(true);
|
| + view2->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| GetContentsView()->AddChildView(view1);
|
| GetContentsView()->AddChildView(view2);
|
|
|
| @@ -559,17 +559,17 @@ TEST_F(FocusManagerTest, FocusInAboutToRequestFocusFromTabTraversal) {
|
| // Create 3 views focuses the 3 and advances to the second. The 2nd views
|
| // implementation of AboutToRequestFocusFromTabTraversal() focuses the first.
|
| views::View* v1 = new View;
|
| - v1->SetFocusable(true);
|
| + v1->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| GetContentsView()->AddChildView(v1);
|
|
|
| FocusInAboutToRequestFocusFromTabTraversalView* v2 =
|
| new FocusInAboutToRequestFocusFromTabTraversalView;
|
| - v2->SetFocusable(true);
|
| + v2->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| v2->set_view_to_focus(v1);
|
| GetContentsView()->AddChildView(v2);
|
|
|
| views::View* v3 = new View;
|
| - v3->SetFocusable(true);
|
| + v3->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| GetContentsView()->AddChildView(v3);
|
|
|
| v3->RequestFocus();
|
| @@ -582,22 +582,22 @@ TEST_F(FocusManagerTest, RotatePaneFocus) {
|
| GetContentsView()->AddChildView(pane1);
|
|
|
| views::View* v1 = new View;
|
| - v1->SetFocusable(true);
|
| + v1->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| pane1->AddChildView(v1);
|
|
|
| views::View* v2 = new View;
|
| - v2->SetFocusable(true);
|
| + v2->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| pane1->AddChildView(v2);
|
|
|
| views::AccessiblePaneView* pane2 = new AccessiblePaneView();
|
| GetContentsView()->AddChildView(pane2);
|
|
|
| views::View* v3 = new View;
|
| - v3->SetFocusable(true);
|
| + v3->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| pane2->AddChildView(v3);
|
|
|
| views::View* v4 = new View;
|
| - v4->SetFocusable(true);
|
| + v4->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| pane2->AddChildView(v4);
|
|
|
| std::vector<views::View*> panes;
|
| @@ -652,11 +652,11 @@ TEST_F(FocusManagerTest, RotatePaneFocus) {
|
| // Verifies the stored focus view tracks the focused view.
|
| TEST_F(FocusManagerTest, ImplicitlyStoresFocus) {
|
| views::View* v1 = new View;
|
| - v1->SetFocusable(true);
|
| + v1->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| GetContentsView()->AddChildView(v1);
|
|
|
| views::View* v2 = new View;
|
| - v2->SetFocusable(true);
|
| + v2->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| GetContentsView()->AddChildView(v2);
|
|
|
| // Verify a focus request on |v1| implicitly updates the stored focus view.
|
| @@ -710,7 +710,7 @@ TEST_F(FocusManagerArrowKeyTraversalTest, ArrowKeyTraversal) {
|
| std::vector<views::View*> v;
|
| for (size_t i = 0; i < 2; ++i) {
|
| views::View* view = new View;
|
| - view->SetFocusable(true);
|
| + view->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| GetContentsView()->AddChildView(view);
|
| v.push_back(view);
|
| }
|
| @@ -791,7 +791,7 @@ class AdvanceFocusWidgetDelegate : public WidgetDelegate {
|
| TEST_F(FocusManagerTest, AdvanceFocusStaysInWidget) {
|
| // Add |widget_view| as a child of the Widget.
|
| View* widget_view = new View;
|
| - widget_view->SetFocusable(true);
|
| + widget_view->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| widget_view->SetBounds(20, 0, 20, 20);
|
| GetContentsView()->AddChildView(widget_view);
|
|
|
| @@ -807,10 +807,10 @@ TEST_F(FocusManagerTest, AdvanceFocusStaysInWidget) {
|
| params.delegate = delegate.get();
|
| child_widget.Init(params);
|
| View* view1 = new View;
|
| - view1->SetFocusable(true);
|
| + view1->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| view1->SetBounds(0, 0, 20, 20);
|
| View* view2 = new View;
|
| - view2->SetFocusable(true);
|
| + view2->SetFocusBehavior(View::FocusBehavior::ALWAYS);
|
| view2->SetBounds(20, 0, 20, 20);
|
| child_widget.client_view()->AddChildView(view1);
|
| child_widget.client_view()->AddChildView(view2);
|
|
|