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

Unified Diff: ui/views/widget/root_view_unittest.cc

Issue 1898633004: Views: Add new SetFocusBehavior method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/native_widget_mac_unittest.mm ('k') | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/root_view_unittest.cc
diff --git a/ui/views/widget/root_view_unittest.cc b/ui/views/widget/root_view_unittest.cc
index 3a47540aba6d62145791b4974bb14091138ec73f..26a9b3d9495782568874d479d9ca7c85502ba19a 100644
--- a/ui/views/widget/root_view_unittest.cc
+++ b/ui/views/widget/root_view_unittest.cc
@@ -54,7 +54,7 @@ TEST_F(RootViewTest, DeleteViewDuringKeyEventDispatch) {
content->AddChildView(child);
// Give focus to |child| so that it will be the target of the key event.
- child->SetFocusable(true);
+ child->SetFocusBehavior(View::FocusBehavior::ALWAYS);
child->RequestFocus();
internal::RootView* root_view =
@@ -121,7 +121,7 @@ TEST_F(RootViewTest, ContextMenuFromKeyEvent) {
View* focused_view = new View;
focused_view->set_context_menu_controller(&controller);
widget.SetContentsView(focused_view);
- focused_view->SetFocusable(true);
+ focused_view->SetFocusBehavior(View::FocusBehavior::ALWAYS);
focused_view->RequestFocus();
// No context menu should be shown for a keypress of 'A'.
« no previous file with comments | « ui/views/widget/native_widget_mac_unittest.mm ('k') | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698