| Index: ui/views/focus/focus_traversal_unittest.cc
|
| ===================================================================
|
| --- ui/views/focus/focus_traversal_unittest.cc (revision 181830)
|
| +++ ui/views/focus/focus_traversal_unittest.cc (working copy)
|
| @@ -15,12 +15,15 @@
|
| #include "ui/views/controls/link.h"
|
| #include "ui/views/controls/native/native_view_host.h"
|
| #include "ui/views/controls/scroll_view.h"
|
| -#include "ui/views/controls/tabbed_pane/tabbed_pane.h"
|
| #include "ui/views/controls/textfield/textfield.h"
|
| #include "ui/views/focus/focus_manager_test.h"
|
| #include "ui/views/widget/root_view.h"
|
| #include "ui/views/widget/widget.h"
|
|
|
| +#if !defined(USE_AURA)
|
| +#include "ui/views/controls/tabbed_pane/tabbed_pane.h"
|
| +#endif
|
| +
|
| namespace views {
|
|
|
| namespace {
|
| @@ -65,12 +68,14 @@
|
| const int kCancelButtonID = count++;
|
| const int kHelpButtonID = count++;
|
|
|
| +#if !defined(USE_AURA)
|
| 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
|
| +#endif
|
|
|
| const int kSearchContainerID = count++;
|
| const int kSearchTextfieldID = count++;
|
| @@ -194,8 +199,10 @@
|
| View* view = GetContentsView()->GetViewByID(id);
|
| if (view)
|
| return view;
|
| +#if !defined(USE_AURA)
|
| if (style_tab_)
|
| view = style_tab_->GetSelectedTab()->GetViewByID(id);
|
| +#endif
|
| if (view)
|
| return view;
|
| view = search_border_view_->GetContentsRootView()->GetViewByID(id);
|
| @@ -205,7 +212,9 @@
|
| }
|
|
|
| protected:
|
| +#if !defined(USE_AURA)
|
| TabbedPane* style_tab_;
|
| +#endif
|
| BorderView* search_border_view_;
|
| DummyComboboxModel combobox_model_;
|
| PaneView* left_container_;
|
| @@ -215,7 +224,10 @@
|
| };
|
|
|
| FocusTraversalTest::FocusTraversalTest()
|
| - : style_tab_(NULL),
|
| + :
|
| +#if !defined(USE_AURA)
|
| + style_tab_(NULL),
|
| +#endif
|
| search_border_view_(NULL) {
|
| }
|
|
|
| @@ -264,6 +276,7 @@
|
| // NativeButton * kOKButtonID
|
| // NativeButton * kCancelButtonID
|
| // NativeButton * kHelpButtonID
|
| + // #if !defined(USE_AURA)
|
| // TabbedPane * kStyleContainerID
|
| // View
|
| // Checkbox * kBoldCheckBoxID
|
| @@ -272,6 +285,7 @@
|
| // Link * kStyleHelpLinkID
|
| // Textfield * kStyleTextEditID
|
| // Other
|
| + // #endif
|
| // BorderView kSearchContainerID
|
| // View
|
| // Textfield * kSearchTextfieldID
|
| @@ -475,6 +489,7 @@
|
| View* contents = NULL;
|
| Link* link = NULL;
|
|
|
| +#if !defined(USE_AURA)
|
| // Left bottom box with style checkboxes.
|
| contents = new View();
|
| contents->set_background(Background::CreateSolidBackground(SK_ColorWHITE));
|
| @@ -509,6 +524,7 @@
|
| style_tab_->SetBounds(10, y, 210, 100);
|
| style_tab_->AddTab(ASCIIToUTF16("Style"), contents);
|
| style_tab_->AddTab(ASCIIToUTF16("Other"), new View());
|
| +#endif
|
|
|
| // Right bottom box with search.
|
| contents = new View();
|
| @@ -565,8 +581,10 @@
|
| kDinerGameLinkID, kRidiculeLinkID, kClosetLinkID, kVisitingLinkID,
|
| kAmelieLinkID, kJoyeuxNoelLinkID, kCampingLinkID, kBriceDeNiceLinkID,
|
| kTaxiLinkID, kAsterixLinkID, kOKButtonID, kCancelButtonID, kHelpButtonID,
|
| +#if !defined(USE_AURA)
|
| kStyleContainerID, kBoldCheckBoxID, kItalicCheckBoxID,
|
| kUnderlinedCheckBoxID, kStyleHelpLinkID, kStyleTextEditID,
|
| +#endif
|
| kSearchTextfieldID, kSearchButtonID, kHelpLinkID,
|
| kThumbnailContainerID, kThumbnailStarID, kThumbnailSuperStarID };
|
|
|
| @@ -604,15 +622,21 @@
|
| const int kDisabledIDs[] = {
|
| kBananaTextfieldID, kFruitCheckBoxID, kComboboxID, kAsparagusButtonID,
|
| kCauliflowerButtonID, kClosetLinkID, kVisitingLinkID, kBriceDeNiceLinkID,
|
| - kTaxiLinkID, kAsterixLinkID, kHelpButtonID, kBoldCheckBoxID,
|
| + kTaxiLinkID, kAsterixLinkID, kHelpButtonID,
|
| +#if !defined(USE_AURA)
|
| + kBoldCheckBoxID,
|
| +#endif
|
| kSearchTextfieldID, kHelpLinkID };
|
|
|
| const int kTraversalIDs[] = { kTopCheckBoxID, kAppleTextfieldID,
|
| kOrangeTextfieldID, kKiwiTextfieldID, kFruitButtonID, kBroccoliButtonID,
|
| kRosettaLinkID, kStupeurEtTremblementLinkID, kDinerGameLinkID,
|
| kRidiculeLinkID, kAmelieLinkID, kJoyeuxNoelLinkID, kCampingLinkID,
|
| - kOKButtonID, kCancelButtonID, kStyleContainerID, kItalicCheckBoxID,
|
| - kUnderlinedCheckBoxID, kStyleHelpLinkID, kStyleTextEditID,
|
| + kOKButtonID, kCancelButtonID,
|
| +#if !defined(USE_AURA)
|
| + kStyleContainerID, kItalicCheckBoxID, kUnderlinedCheckBoxID,
|
| + kStyleHelpLinkID, kStyleTextEditID,
|
| +#endif
|
| kSearchButtonID, kThumbnailContainerID, kThumbnailStarID,
|
| kThumbnailSuperStarID };
|
|
|
| @@ -663,9 +687,12 @@
|
| kStupeurEtTremblementLinkID, kDinerGameLinkID, kRidiculeLinkID,
|
| kClosetLinkID, kVisitingLinkID, kAmelieLinkID, kJoyeuxNoelLinkID,
|
| kCampingLinkID, kBriceDeNiceLinkID, kTaxiLinkID, kAsterixLinkID,
|
| - kCancelButtonID, kHelpButtonID, kStyleContainerID, kBoldCheckBoxID,
|
| - kItalicCheckBoxID, kUnderlinedCheckBoxID, kStyleHelpLinkID,
|
| - kStyleTextEditID, kSearchTextfieldID, kSearchButtonID, kHelpLinkID };
|
| + kCancelButtonID, kHelpButtonID,
|
| +#if !defined(USE_AURA)
|
| + kStyleContainerID, kBoldCheckBoxID, kItalicCheckBoxID,
|
| + kUnderlinedCheckBoxID, kStyleHelpLinkID, kStyleTextEditID,
|
| +#endif
|
| + kSearchTextfieldID, kSearchButtonID, kHelpLinkID };
|
|
|
|
|
| // Let's make some views invisible.
|
|
|