0

Fix to pure view test on touch.

TBR=ben@chromium.org
BUG=none
TEST=AccessibilityEventRouterViewsTest.TestFocusNotification

Review URL: http://codereview.chromium.org/7278010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91233 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
saintlou@chromium.org
2011-06-30 23:49:39 +00:00
parent f9a45b0b8d
commit 3be6c69d07
2 changed files with 3 additions and 3 deletions

@ -130,7 +130,6 @@ class AccessibilityEventRouterViewsTest
AccessibilityWindowDelegate* window_delegate_;
};
#if !defined(TOUCH_UI)
TEST_F(AccessibilityEventRouterViewsTest, TestFocusNotification) {
const char kButton1ASCII[] = "Button1";
const char kButton2ASCII[] = "Button2";
@ -191,6 +190,5 @@ TEST_F(AccessibilityEventRouterViewsTest, TestFocusNotification) {
EXPECT_EQ(3, focus_event_count_);
EXPECT_EQ(kButton1ASCII, last_control_name_);
}
#endif
#endif // defined(TOOLKIT_VIEWS)

@ -11,6 +11,7 @@
#include "views/controls/native/native_view_host.h"
#include "views/controls/native/native_view_host_views.h"
#include "views/focus/focus_manager.h"
#include "views/views_delegate.h"
#include "views/widget/gtk_views_fixed.h"
#include "views/widget/native_widget_gtk.h"
#include "views/widget/widget.h"
@ -377,7 +378,8 @@ gboolean NativeViewHostGtk::CallFocusIn(GtkWidget* widget,
// static
NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper(
NativeViewHost* host) {
if (Widget::IsPureViews())
if (Widget::IsPureViews() &&
views::ViewsDelegate::views_delegate->GetDefaultParentView())
return new NativeViewHostViews(host);
return new NativeViewHostGtk(host);
}