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

Unified Diff: chrome/browser/chromeos/input_method/textinput_test_helper.cc

Issue 23245012: Fix Views Combobox and Tree View text input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nit. Created 7 years, 4 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/controls/combobox/combobox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/textinput_test_helper.cc
diff --git a/chrome/browser/chromeos/input_method/textinput_test_helper.cc b/chrome/browser/chromeos/input_method/textinput_test_helper.cc
index e7bc859c0ac1964d3e4ade75702fe42b67029c36..2f9012fd720f65897d270421f82a92d91da3cbd1 100644
--- a/chrome/browser/chromeos/input_method/textinput_test_helper.cc
+++ b/chrome/browser/chromeos/input_method/textinput_test_helper.cc
@@ -73,7 +73,8 @@ ui::TextInputClient* TextInputTestHelper::GetTextInputClient() const {
void TextInputTestHelper::OnTextInputTypeChanged(
const ui::TextInputClient* client) {
- latest_text_input_type_ = client->GetTextInputType();
+ latest_text_input_type_ =
+ client ? client->GetTextInputType() : ui::TEXT_INPUT_TYPE_NONE;
if (waiting_type_ == WAIT_ON_TEXT_INPUT_TYPE_CHANGED)
base::MessageLoop::current()->Quit();
}
@@ -101,7 +102,8 @@ void TextInputTestHelper::OnUntranslatedIMEMessage(
void TextInputTestHelper::OnCaretBoundsChanged(
const ui::TextInputClient* client) {
ui::Range text_range;
- if (!GetTextInputClient()->GetTextRange(&text_range) ||
+ if (!GetTextInputClient() || GetTextInputClient() != client ||
+ !GetTextInputClient()->GetTextRange(&text_range) ||
!GetTextInputClient()->GetTextFromRange(text_range, &surrounding_text_) ||
!GetTextInputClient()->GetSelectionRange(&selection_range_))
return;
« no previous file with comments | « no previous file | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698