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

Unified Diff: ui/views/controls/textfield/textfield_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/controls/textfield/textfield.cc ('k') | ui/views/controls/tree/tree_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield_unittest.cc
diff --git a/ui/views/controls/textfield/textfield_unittest.cc b/ui/views/controls/textfield/textfield_unittest.cc
index 8e14fa064c08840e994791923b0ba10c72409426..c7ffba28830a90374a22a9c721a1639bc83291b2 100644
--- a/ui/views/controls/textfield/textfield_unittest.cc
+++ b/ui/views/controls/textfield/textfield_unittest.cc
@@ -2546,11 +2546,11 @@ TEST_F(TextfieldTouchSelectionTest, TouchSelectionInUnfocusableTextfield) {
// Make textfield unfocusable and tap on it. Touch text selection should not
// get activated.
- textfield_->SetFocusable(false);
+ textfield_->SetFocusBehavior(View::FocusBehavior::NEVER);
Tap(touch_point);
EXPECT_FALSE(textfield_->HasFocus());
EXPECT_FALSE(test_api_->touch_selection_controller());
- textfield_->SetFocusable(true);
+ textfield_->SetFocusBehavior(View::FocusBehavior::ALWAYS);
}
// No touch on desktop Mac. Tracked in http://crbug.com/445520.
« no previous file with comments | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/controls/tree/tree_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698