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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc

Issue 10917061: Fix preedit handling on IME switching. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Revise comments Created 8 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h" 5 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 977
978 TEST_F(InputMethodManagerImplTest, TestReset) { 978 TEST_F(InputMethodManagerImplTest, TestReset) {
979 manager_->SetState(InputMethodManager::STATE_BROWSER_SCREEN); 979 manager_->SetState(InputMethodManager::STATE_BROWSER_SCREEN);
980 std::vector<std::string> ids; 980 std::vector<std::string> ids;
981 ids.push_back("xkb:us::eng"); 981 ids.push_back("xkb:us::eng");
982 ids.push_back("mozc"); 982 ids.push_back("mozc");
983 EXPECT_TRUE(manager_->EnableInputMethods(ids)); 983 EXPECT_TRUE(manager_->EnableInputMethods(ids));
984 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); 984 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods());
985 EXPECT_EQ(1, controller_->reset_count_); 985 EXPECT_EQ(1, controller_->reset_count_);
986 manager_->ChangeInputMethod("mozc"); 986 manager_->ChangeInputMethod("mozc");
987 EXPECT_EQ(1, controller_->change_input_method_count_);
988 EXPECT_EQ("mozc", controller_->change_input_method_id_);
987 EXPECT_EQ(1, controller_->reset_count_); 989 EXPECT_EQ(1, controller_->reset_count_);
988 manager_->ChangeInputMethod("xkb:us::eng"); 990 manager_->ChangeInputMethod("xkb:us::eng");
989 EXPECT_EQ(2, controller_->reset_count_); 991 EXPECT_EQ(2, controller_->change_input_method_count_);
992 EXPECT_EQ("mozc", controller_->change_input_method_id_);
993 EXPECT_EQ(1, controller_->reset_count_);
990 } 994 }
991 995
992 } // namespace input_method 996 } // namespace input_method
993 } // namespace chromeos 997 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698