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

Unified Diff: chromeos/ime/input_method_whitelist_unittest.cc

Issue 750353004: Revert of Moves code from chromeos/ime to ui/base/ime/chromeos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
Index: chromeos/ime/input_method_whitelist_unittest.cc
diff --git a/chromeos/ime/input_method_whitelist_unittest.cc b/chromeos/ime/input_method_whitelist_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6a0d5c50109a5afe6ae102c4dbaded0f5b6e1628
--- /dev/null
+++ b/chromeos/ime/input_method_whitelist_unittest.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/logging.h"
+#include "chromeos/ime/input_method_whitelist.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace chromeos {
+namespace input_method {
+
+namespace {
+
+class InputMethodWhitelistTest : public testing::Test {
+ protected:
+ const InputMethodWhitelist whitelist_;
+};
+
+} // namespace
+
+TEST_F(InputMethodWhitelistTest, TestInputMethodIdIsWhitelisted) {
+ EXPECT_TRUE(whitelist_.InputMethodIdIsWhitelisted("xkb:us:dvorak:eng"));
+ EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted("mozc,"));
+ EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted(
+ "mozc-pinyin,xkb:us:dvorak:eng"));
+ EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted("not-supported-id"));
+ EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted(","));
+ EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted(""));
+}
+
+} // namespace input_method
+} // namespace chromeos
« no previous file with comments | « chromeos/ime/input_method_whitelist.cc ('k') | chromeos/ime/mock_component_extension_ime_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698