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

Unified Diff: ui/views/controls/label_unittest.cc

Issue 1690543004: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: ui/views/controls/label_unittest.cc
diff --git a/ui/views/controls/label_unittest.cc b/ui/views/controls/label_unittest.cc
index ef896fdccc6cc9d80bad753161fd5aa1c7b473c8..1f3d61d597659b67e4fe9a0f8cef22a0f9f43f59 100644
--- a/ui/views/controls/label_unittest.cc
+++ b/ui/views/controls/label_unittest.cc
@@ -376,7 +376,7 @@ TEST_F(LabelTest, PreferredSizeForAllowCharacterBreak) {
TEST_F(LabelTest, MultiLineSizing) {
Label label;
- label.SetFocusable(false);
+ label.SetFocusBehavior(views::View::FocusBehavior::NEVER);
label.SetText(
ASCIIToUTF16("A random string\nwith multiple lines\nand returns!"));
label.SetMultiLine(true);
@@ -461,7 +461,7 @@ TEST_F(LabelTest, MultiLineSizingWithElide) {
const base::string16 text =
ASCIIToUTF16("A random string\nwith multiple lines\nand returns!");
Label label;
- label.SetFocusable(false);
+ label.SetFocusBehavior(views::View::FocusBehavior::NEVER);
label.SetText(text);
label.SetMultiLine(true);
@@ -612,7 +612,7 @@ TEST_F(LabelFocusTest, FocusBounds) {
label()->SetText(ASCIIToUTF16("Example"));
gfx::Size normal_size = label()->GetPreferredSize();
- label()->SetFocusable(true);
+ label()->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
label()->RequestFocus();
gfx::Size focusable_size = label()->GetPreferredSize();
// Focusable label requires larger size to paint the focus rectangle.
@@ -649,7 +649,7 @@ TEST_F(LabelFocusTest, FocusBounds) {
}
TEST_F(LabelFocusTest, EmptyLabel) {
- label()->SetFocusable(true);
+ label()->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
label()->RequestFocus();
label()->SizeToPreferredSize();
« no previous file with comments | « ui/views/controls/label.cc ('k') | ui/views/controls/link.h » ('j') | ui/views/view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698