Index: ui/views/view_unittest.cc |
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc |
index 7ffd8624ea58b4c00ce88f95253655d1075e63fa..89e3c1bb94db3192ab7ad385b757aefc7e79e4f2 100644 |
--- a/ui/views/view_unittest.cc |
+++ b/ui/views/view_unittest.cc |
@@ -239,7 +239,7 @@ class TestView : public View { |
views::View::Blur(); |
} |
- bool focusable() const { return View::focusable(); } |
+ FocusBehavior focus_behavior() const { return View::focus_behavior(); } |
void set_can_process_events_within_subtree(bool can_process) { |
can_process_events_within_subtree_ = can_process; |
@@ -4366,15 +4366,17 @@ TEST_F(ViewTest, FocusableAssertions) { |
// which effects the preferred size. To avoid preferred size changing around |
// these Views need to key off the last value set to SetFocusBehavior(), not |
// whether the View is focusable right now. For this reason it's important |
- // that the return value of focusable() depends on the last value passed to |
- // SetFocusBehavior and not whether the View is focusable right now. |
+ // that the return value of focus_behavior() depends on the last value passed |
+ // to SetFocusBehavior and not whether the View is focusable right now. |
TestView view; |
view.SetFocusBehavior(View::FocusBehavior::ALWAYS); |
- EXPECT_TRUE(view.focusable()); |
+ EXPECT_EQ(View::FocusBehavior::ALWAYS, view.focus_behavior()); |
view.SetEnabled(false); |
- EXPECT_TRUE(view.focusable()); |
+ EXPECT_EQ(View::FocusBehavior::ALWAYS, view.focus_behavior()); |
view.SetFocusBehavior(View::FocusBehavior::NEVER); |
- EXPECT_FALSE(view.focusable()); |
+ EXPECT_EQ(View::FocusBehavior::NEVER, view.focus_behavior()); |
+ view.SetFocusBehavior(View::FocusBehavior::ACCESSIBLE_ONLY); |
+ EXPECT_EQ(View::FocusBehavior::ACCESSIBLE_ONLY, view.focus_behavior()); |
} |
// Verifies when a view is deleted it is removed from ViewStorage. |