| 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
|
|
|