This source file includes following definitions.
- TEST_F
#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_;
};
}
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(""));
}
}
}