| Index: chrome/browser/chromeos/input_method/input_method_engine_unittest.cc
|
| diff --git a/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc b/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc
|
| index 31ce00355a52ac43b6214da39f7c9457ebb2ec44..ba2b8e85699937bcd91b23a9078e92d64800b36c 100644
|
| --- a/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc
|
| +++ b/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc
|
| @@ -25,8 +25,7 @@ const char kTestExtensionId2[] = "dmpipdbjkoajgdeppkffbjhngfckdloi";
|
| const char kTestImeComponentId[] = "test_engine_id";
|
|
|
| const char* kHistogramNames[] = {
|
| - "InputMethod.Enable.test_engine_id", "InputMethod.Commit.test_engine_id",
|
| - "InputMethod.CommitCharacter.test_engine_id",
|
| + "InputMethod.CommitLength",
|
| };
|
|
|
| scoped_ptr<base::HistogramSamples> GetHistogramSamples(
|
| @@ -280,15 +279,18 @@ TEST_F(InputMethodEngineTest, TestHistograms) {
|
| CreateEngine(true);
|
| FocusIn(ui::TEXT_INPUT_TYPE_TEXT);
|
| engine_->Enable(kTestImeComponentId);
|
| + std::vector<InputMethodEngineInterface::SegmentInfo> segments;
|
| + engine_->SetComposition(
|
| + engine_->GetCotextIdForTesting(), "test", 0, 0, 0, segments, NULL);
|
| std::string error;
|
| - ExpectNewSample("InputMethod.Enable.test_engine_id", 1, 1, 1);
|
| engine_->CommitText(1, "input", &error);
|
| - engine_->CommitText(1, "入力", &error);
|
| - engine_->CommitText(1, "input入力", &error);
|
| - ExpectNewSample("InputMethod.Commit.test_engine_id", 1, 3, 3);
|
| - ExpectNewSample("InputMethod.CommitCharacter.test_engine_id", 5, 3, 1);
|
| - ExpectNewSample("InputMethod.CommitCharacter.test_engine_id", 2, 3, 1);
|
| - ExpectNewSample("InputMethod.CommitCharacter.test_engine_id", 7, 3, 1);
|
| + engine_->CommitText(1,
|
| + "\xE5\x85\xA5\xE5\x8A\x9B", // 2 UTF-8 characters
|
| + &error);
|
| + engine_->CommitText(1, "input\xE5\x85\xA5\xE5\x8A\x9B", &error);
|
| + ExpectNewSample("InputMethod.CommitLength", 5, 3, 1);
|
| + ExpectNewSample("InputMethod.CommitLength", 2, 3, 1);
|
| + ExpectNewSample("InputMethod.CommitLength", 7, 3, 1);
|
| }
|
|
|
| } // namespace input_method
|
|
|