diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-06 18:23:25 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-06 18:23:25 +0000 |
commit | cde11b1f3969506d7fdf9699f3f3635f72d01b8a (patch) | |
tree | 4872d5060dce21850efa8b45c1d6299c623b0297 /ui | |
parent | 683c8c52deba443b16049e26d470a8984347f6bf (diff) | |
download | chromium_src-cde11b1f3969506d7fdf9699f3f3635f72d01b8a.zip chromium_src-cde11b1f3969506d7fdf9699f3f3635f72d01b8a.tar.gz chromium_src-cde11b1f3969506d7fdf9699f3f3635f72d01b8a.tar.bz2 |
views: Reland r192519 and r192557.
They got partially reverted accidentally by https://chromiumcodereview.appspot.com/13584010
- r192722
BUG=155363
TBR=msw@chromium.org
Review URL: https://codereview.chromium.org/13610006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/views/focus/focus_traversal_unittest.cc | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/ui/views/focus/focus_traversal_unittest.cc b/ui/views/focus/focus_traversal_unittest.cc index b8e4457..c85f6cd 100644 --- a/ui/views/focus/focus_traversal_unittest.cc +++ b/ui/views/focus/focus_traversal_unittest.cc @@ -9,8 +9,8 @@ #include "base/utf_string_conversions.h" #include "ui/base/models/combobox_model.h" #include "ui/views/controls/button/checkbox.h" +#include "ui/views/controls/button/label_button.h" #include "ui/views/controls/button/radio_button.h" -#include "ui/views/controls/button/text_button.h" #include "ui/views/controls/combobox/combobox.h" #include "ui/views/controls/label.h" #include "ui/views/controls/link.h" @@ -104,7 +104,7 @@ class PaneView : public View, public FocusTraversable { focus_search_ = focus_search; } - // Overridden from views::View: + // Overridden from View: virtual FocusTraversable* GetPaneFocusTraversable() OVERRIDE { if (focus_search_) return this; @@ -112,7 +112,7 @@ class PaneView : public View, public FocusTraversable { return NULL; } - // Overridden from views::FocusTraversable: + // Overridden from FocusTraversable: virtual views::FocusSearch* GetFocusSearch() OVERRIDE { return focus_search_; } @@ -359,8 +359,8 @@ void FocusTraversalTest::InitContentView() { y += label_height + gap_between_labels; - NativeTextButton* button = new NativeTextButton(NULL, - ASCIIToUTF16("Click me")); + LabelButton* button = new LabelButton(NULL, ASCIIToUTF16("Click me")); + button->SetStyle(Button::STYLE_NATIVE_TEXTBUTTON); button->SetBounds(label_x, y + 10, 80, 30); button->set_id(kFruitButtonID); left_container_->AddChildView(button); @@ -455,19 +455,22 @@ void FocusTraversalTest::InitContentView() { y = 250; int width = 60; - button = new NativeTextButton(NULL, ASCIIToUTF16("OK")); + button = new LabelButton(NULL, ASCIIToUTF16("OK")); + button->SetStyle(Button::STYLE_NATIVE_TEXTBUTTON); button->set_id(kOKButtonID); button->SetIsDefault(true); GetContentsView()->AddChildView(button); button->SetBounds(150, y, width, 30); - button = new NativeTextButton(NULL, ASCIIToUTF16("Cancel")); + button = new LabelButton(NULL, ASCIIToUTF16("Cancel")); + button->SetStyle(Button::STYLE_NATIVE_TEXTBUTTON); button->set_id(kCancelButtonID); GetContentsView()->AddChildView(button); button->SetBounds(220, y, width, 30); - button = new NativeTextButton(NULL, ASCIIToUTF16("Help")); + button = new LabelButton(NULL, ASCIIToUTF16("Help")); + button->SetStyle(Button::STYLE_NATIVE_TEXTBUTTON); button->set_id(kHelpButtonID); GetContentsView()->AddChildView(button); button->SetBounds(290, y, width, 30); @@ -520,7 +523,8 @@ void FocusTraversalTest::InitContentView() { text_field->SetBounds(10, 10, 100, 20); text_field->set_id(kSearchTextfieldID); - button = new NativeTextButton(NULL, ASCIIToUTF16("Search")); + button = new LabelButton(NULL, ASCIIToUTF16("Search")); + button->SetStyle(Button::STYLE_NATIVE_TEXTBUTTON); contents->AddChildView(button); button->SetBounds(112, 5, 60, 30); button->set_id(kSearchButtonID); @@ -543,11 +547,13 @@ void FocusTraversalTest::InitContentView() { contents->set_focusable(true); contents->set_background(Background::CreateSolidBackground(SK_ColorBLUE)); contents->set_id(kThumbnailContainerID); - button = new NativeTextButton(NULL, ASCIIToUTF16("Star")); + button = new LabelButton(NULL, ASCIIToUTF16("Star")); + button->SetStyle(Button::STYLE_NATIVE_TEXTBUTTON); contents->AddChildView(button); button->SetBounds(5, 5, 50, 30); button->set_id(kThumbnailStarID); - button = new NativeTextButton(NULL, ASCIIToUTF16("SuperStar")); + button = new LabelButton(NULL, ASCIIToUTF16("SuperStar")); + button->SetStyle(Button::STYLE_NATIVE_TEXTBUTTON); contents->AddChildView(button); button->SetBounds(60, 5, 100, 30); button->set_id(kThumbnailSuperStarID); |