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

Unified Diff: ui/base/ime/input_method_ibus_unittest.cc

Issue 13812013: Fix ibus-m17n crash due to wrong parameter from Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittests Created 7 years, 8 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
« ui/base/ime/input_method_ibus.cc ('K') | « ui/base/ime/input_method_ibus.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_ibus_unittest.cc
diff --git a/ui/base/ime/input_method_ibus_unittest.cc b/ui/base/ime/input_method_ibus_unittest.cc
index 0ed408611aa4bec53f9702c4d3a18ad3b447ba9f..df04e6883ed0588dfd89c1879347b48942ac21be 100644
--- a/ui/base/ime/input_method_ibus_unittest.cc
+++ b/ui/base/ime/input_method_ibus_unittest.cc
@@ -1147,9 +1147,10 @@ TEST_F(InputMethodIBusTest, SurroundingText_NoSelectionTest) {
selection_range_ = ui::Range(3, 3);
// Set the verifier for SetSurroundingText mock call.
- SetSurroundingTextVerifier verifier(UTF16ToUTF8(surrounding_text_),
- selection_range_.start(),
- selection_range_.end());
+ SetSurroundingTextVerifier verifier(
+ UTF16ToUTF8(surrounding_text_),
+ selection_range_.start() - text_range_.start(),
+ selection_range_.end() - text_range_.end());
mock_ibus_input_context_client_->set_set_surrounding_text_handler(
base::Bind(&SetSurroundingTextVerifier::Verify,
@@ -1178,9 +1179,10 @@ TEST_F(InputMethodIBusTest, SurroundingText_SelectionTest) {
selection_range_ = ui::Range(2, 5);
// Set the verifier for SetSurroundingText mock call.
- SetSurroundingTextVerifier verifier(UTF16ToUTF8(surrounding_text_),
- selection_range_.start(),
- selection_range_.end());
+ SetSurroundingTextVerifier verifier(
+ UTF16ToUTF8(surrounding_text_),
+ selection_range_.start() - text_range_.start(),
+ selection_range_.end() - text_range_.end());
mock_ibus_input_context_client_->set_set_surrounding_text_handler(
base::Bind(&SetSurroundingTextVerifier::Verify,
« ui/base/ime/input_method_ibus.cc ('K') | « ui/base/ime/input_method_ibus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698