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

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

Issue 9837082: Do not try to get a display name from an input method ID which starts with "_ext_ime". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 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 | « chrome/browser/chromeos/input_method/input_method_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/input_method_util_unittest.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_util_unittest.cc b/chrome/browser/chromeos/input_method/input_method_util_unittest.cc
index aae6745568b87603af367ca558eb8da50642de0a..91bf4f49fc27866e8803ccad6e944ba0003ab721 100644
--- a/chrome/browser/chromeos/input_method/input_method_util_unittest.cc
+++ b/chrome/browser/chromeos/input_method/input_method_util_unittest.cc
@@ -30,6 +30,9 @@
#endif // USE_VIRTUAL_KEYBOARD
namespace chromeos {
+
+extern const char* kExtensionImePrefix;
+
namespace input_method {
namespace {
@@ -193,6 +196,13 @@ TEST_F(InputMethodUtilTest, TestIsKeyboardLayout) {
EXPECT_FALSE(InputMethodUtil::IsKeyboardLayout("mozc"));
}
+TEST_F(InputMethodUtilTest, TestExtensionInputMethod) {
+ EXPECT_TRUE(InputMethodUtil::IsExtensionInputMethod(
+ kExtensionImePrefix + std::string("123abc")));
+ EXPECT_FALSE(InputMethodUtil::IsExtensionInputMethod(""));
+ EXPECT_FALSE(InputMethodUtil::IsExtensionInputMethod("mozc"));
+}
+
TEST_F(InputMethodUtilTest, TestGetKeyboardLayoutName) {
// Unsupported case.
EXPECT_EQ("", util_.GetKeyboardLayoutName("UNSUPPORTED_ID"));
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698