Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: ui/views/controls/textfield/native_textfield_views_unittest.cc

Issue 12902029: Fix InputMethod Widget activation checks; cleanup, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/ime/input_method.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/native_textfield_views_unittest.cc
diff --git a/ui/views/controls/textfield/native_textfield_views_unittest.cc b/ui/views/controls/textfield/native_textfield_views_unittest.cc
index 9f8fffe0806132f9f30f27993bb29bbe6db9a1e5..517c14d799a84abe04eb73190044f1856d71328d 100644
--- a/ui/views/controls/textfield/native_textfield_views_unittest.cc
+++ b/ui/views/controls/textfield/native_textfield_views_unittest.cc
@@ -172,7 +172,7 @@ class NativeTextfieldViewsTest : public ViewsTestBase,
ASSERT_FALSE(textfield_);
textfield_ = new TestTextfield(style);
textfield_->SetController(this);
- widget_ = new Widget;
+ widget_ = new Widget();
Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP);
params.bounds = gfx::Rect(100, 100, 100, 100);
widget_->Init(params);
@@ -198,11 +198,8 @@ class NativeTextfieldViewsTest : public ViewsTestBase,
input_method_ = new MockInputMethod();
widget_->ReplaceInputMethod(input_method_);
- // Assumes the Widget is always focused.
- input_method_->OnFocus();
-
- // TODO(msw): Determine why this requires two calls to work on Windows.
- textfield_->RequestFocus();
+ // Activate the widget and focus the textfield for input handling.
+ widget_->Activate();
textfield_->RequestFocus();
}
« no previous file with comments | « no previous file | ui/views/ime/input_method.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698