Chromium Code Reviews| Index: ui/views/focus/focus_traversal_unittest.cc |
| diff --git a/ui/views/focus/focus_traversal_unittest.cc b/ui/views/focus/focus_traversal_unittest.cc |
| index 823904576c7425b012ee9664bb9f461d5532c0f9..5fe22b82a78c574c066b54f45971b346f2c7375d 100644 |
| --- a/ui/views/focus/focus_traversal_unittest.cc |
| +++ b/ui/views/focus/focus_traversal_unittest.cc |
| @@ -33,61 +33,61 @@ namespace views { |
| namespace { |
| -int count = 1; |
| - |
| -const int kTopCheckBoxID = count++; // 1 |
| -const int kLeftContainerID = count++; |
| -const int kAppleLabelID = count++; |
| -const int kAppleTextfieldID = count++; |
| -const int kOrangeLabelID = count++; // 5 |
| -const int kOrangeTextfieldID = count++; |
| -const int kBananaLabelID = count++; |
| -const int kBananaTextfieldID = count++; |
| -const int kKiwiLabelID = count++; |
| -const int kKiwiTextfieldID = count++; // 10 |
| -const int kFruitButtonID = count++; |
| -const int kFruitCheckBoxID = count++; |
| -const int kComboboxID = count++; |
| - |
| -const int kRightContainerID = count++; |
| -const int kAsparagusButtonID = count++; // 15 |
| -const int kBroccoliButtonID = count++; |
| -const int kCauliflowerButtonID = count++; |
| - |
| -const int kInnerContainerID = count++; |
| -const int kScrollViewID = count++; |
| -const int kRosettaLinkID = count++; // 20 |
| -const int kStupeurEtTremblementLinkID = count++; |
| -const int kDinerGameLinkID = count++; |
| -const int kRidiculeLinkID = count++; |
| -const int kClosetLinkID = count++; |
| -const int kVisitingLinkID = count++; // 25 |
| -const int kAmelieLinkID = count++; |
| -const int kJoyeuxNoelLinkID = count++; |
| -const int kCampingLinkID = count++; |
| -const int kBriceDeNiceLinkID = count++; |
| -const int kTaxiLinkID = count++; // 30 |
| -const int kAsterixLinkID = count++; |
| - |
| -const int kOKButtonID = count++; |
| -const int kCancelButtonID = count++; |
| -const int kHelpButtonID = count++; |
| - |
| -const int kStyleContainerID = count++; // 35 |
| -const int kBoldCheckBoxID = count++; |
| -const int kItalicCheckBoxID = count++; |
| -const int kUnderlinedCheckBoxID = count++; |
| -const int kStyleHelpLinkID = count++; |
| -const int kStyleTextEditID = count++; // 40 |
| - |
| -const int kSearchContainerID = count++; |
| -const int kSearchTextfieldID = count++; |
| -const int kSearchButtonID = count++; |
| -const int kHelpLinkID = count++; |
| - |
| -const int kThumbnailContainerID = count++; // 45 |
| -const int kThumbnailStarID = count++; |
| -const int kThumbnailSuperStarID = count++; |
| +enum { |
|
sky
2016/10/05 20:00:22
enum style for chrome is ALL_CAPS.
Elly Fong-Jones
2016/10/06 16:15:30
This is done... but at what cost??
sky
2016/10/06 21:14:40
Consistency?
|
| + kTopCheckBoxID = 1, // 1 |
| + kLeftContainerID, |
| + kAppleLabelID, |
| + kAppleTextfieldID, |
| + kOrangeLabelID, // 5 |
| + kOrangeTextfieldID, |
| + kBananaLabelID, |
| + kBananaTextfieldID, |
| + kKiwiLabelID, |
| + kKiwiTextfieldID, // 10 |
| + kFruitButtonID, |
| + kFruitCheckBoxID, |
| + kComboboxID, |
| + |
| + kRightContainerID, |
| + kAsparagusButtonID, // 15 |
| + kBroccoliButtonID, |
| + kCauliflowerButtonID, |
| + |
| + kInnerContainerID, |
| + kScrollViewID, |
| + kRosettaLinkID, // 20 |
| + kStupeurEtTremblementLinkID, |
| + kDinerGameLinkID, |
| + kRidiculeLinkID, |
| + kClosetLinkID, |
| + kVisitingLinkID, // 25 |
| + kAmelieLinkID, |
| + kJoyeuxNoelLinkID, |
| + kCampingLinkID, |
| + kBriceDeNiceLinkID, |
| + kTaxiLinkID, // 30 |
| + kAsterixLinkID, |
| + |
| + kOKButtonID, |
| + kCancelButtonID, |
| + kHelpButtonID, |
| + |
| + kStyleContainerID, // 35 |
| + kBoldCheckBoxID, |
| + kItalicCheckBoxID, |
| + kUnderlinedCheckBoxID, |
| + kStyleHelpLinkID, |
| + kStyleTextEditID, // 40 |
| + |
| + kSearchContainerID, |
| + kSearchTextfieldID, |
| + kSearchButtonID, |
| + kHelpLinkID, |
| + |
| + kThumbnailContainerID, // 45 |
| + kThumbnailStarID, |
| + kThumbnailSuperStarID, |
| +}; |
| class DummyComboboxModel : public ui::ComboboxModel { |
| public: |
| @@ -192,7 +192,7 @@ class FocusTraversalTest : public FocusManagerTest { |
| if (view) |
| return view; |
| if (style_tab_) |
| - view = style_tab_->GetSelectedTab()->GetViewByID(id); |
| + view = style_tab_->GetSelectedTabViewForTesting()->GetViewByID(id); |
| if (view) |
| return view; |
| view = search_border_view_->GetContentsRootView()->GetViewByID(id); |
| @@ -522,10 +522,10 @@ void FocusTraversalTest::InitContentView() { |
| text_field->set_id(kStyleTextEditID); |
| style_tab_ = new TabbedPane(); |
| - style_tab_->set_id(kStyleContainerID); |
| GetContentsView()->AddChildView(style_tab_); |
| style_tab_->SetBounds(10, y, 210, 100); |
| style_tab_->AddTab(ASCIIToUTF16("Style"), contents); |
| + style_tab_->GetSelectedTabForTesting()->set_id(kStyleContainerID); |
| style_tab_->AddTab(ASCIIToUTF16("Other"), new View()); |
| // Right bottom box with search. |