summaryrefslogtreecommitdiffstats
path: root/views/focus
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-21 17:57:46 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-21 17:57:46 +0000
commit35f83a463a8cb26f2862fc1d051fac6e18eb582a (patch)
tree7f0c891bdfbc31abaf5be7f5dbe6db926787605b /views/focus
parent914550a5a50f81f3e3717a3ff82af56b30a57ce8 (diff)
downloadchromium_src-35f83a463a8cb26f2862fc1d051fac6e18eb582a.zip
chromium_src-35f83a463a8cb26f2862fc1d051fac6e18eb582a.tar.gz
chromium_src-35f83a463a8cb26f2862fc1d051fac6e18eb582a.tar.bz2
Refactoring of tabbed-pane component so it can be ported to Linux toolkit_view.
BUG=None TEST=Make sure the Options dialog still works as expected (tab selection, focus traversal...) Review URL: http://codereview.chromium.org/155668 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21189 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus')
-rw-r--r--views/focus/focus_manager_unittest.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/views/focus/focus_manager_unittest.cc b/views/focus/focus_manager_unittest.cc
index 64410c4..2ae52e1 100644
--- a/views/focus/focus_manager_unittest.cc
+++ b/views/focus/focus_manager_unittest.cc
@@ -21,8 +21,10 @@
#include "views/controls/combobox/native_combobox_wrapper.h"
#include "views/controls/label.h"
#include "views/controls/link.h"
+#include "views/controls/native_control.h"
#include "views/controls/scroll_view.h"
-#include "views/controls/tabbed_pane.h"
+#include "views/controls/tabbed_pane/native_tabbed_pane_wrapper.h"
+#include "views/controls/tabbed_pane/tabbed_pane.h"
#include "views/controls/textfield/textfield.h"
#include "views/widget/accelerator_handler.h"
#include "views/widget/root_view.h"
@@ -273,7 +275,7 @@ class FocusTraversalTest : public FocusManagerTest {
View* view = GetContentsView()->GetViewByID(id);
if (view)
return view;
- view = style_tab_->GetContentsRootView()->GetViewByID(id);
+ view = style_tab_->GetSelectedTab()->GetViewByID(id);
if (view)
return view;
view = search_border_view_->GetContentsRootView()->GetViewByID(id);
@@ -744,8 +746,8 @@ class TestCombobox : public Combobox, public Combobox::Model {
class TestTabbedPane : public TabbedPane {
public:
TestTabbedPane() { }
- virtual HWND TestGetNativeControlHWND() {
- return GetNativeControlHWND();
+ virtual HWND TestGetNativeComponent() {
+ return native_tabbed_pane_->GetTestingHandle();
}
};
@@ -785,7 +787,7 @@ TEST_F(FocusManagerTest, FocusNativeControls) {
::SendMessage(combobox->TestGetNativeComponent(), WM_SETFOCUS, NULL, NULL);
EXPECT_EQ(combobox, GetFocusManager()->GetFocusedView());
- ::SendMessage(tabbed_pane->TestGetNativeControlHWND(), WM_SETFOCUS,
+ ::SendMessage(tabbed_pane->TestGetNativeComponent(), WM_SETFOCUS,
NULL, NULL);
EXPECT_EQ(tabbed_pane, GetFocusManager()->GetFocusedView());