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

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

Issue 13042007: Extract input_method_whitelist.{h|cc} from c/b/chromeos. (2nd try) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: replicate input_methods.txt for migration Created 7 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/logging.h"
6 #include "chrome/browser/chromeos/input_method/input_method_whitelist.h"
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace chromeos {
10 namespace input_method {
11
12 namespace {
13
14 class InputMethodWhitelistTest : public testing::Test {
15 protected:
16 const InputMethodWhitelist whitelist_;
17 };
18
19 } // namespace
20
21 TEST_F(InputMethodWhitelistTest, TestInputMethodIdIsWhitelisted) {
22 EXPECT_TRUE(whitelist_.InputMethodIdIsWhitelisted("mozc"));
23 EXPECT_TRUE(whitelist_.InputMethodIdIsWhitelisted("xkb:us:dvorak:eng"));
24 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted("mozc,"));
25 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted("mozc,xkb:us:dvorak:eng"));
26 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted("not-supported-id"));
27 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted(","));
28 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted(""));
29 }
30
31 } // namespace input_method
32 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_whitelist.cc ('k') | chrome/browser/chromeos/input_method/input_methods.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698