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

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

Issue 10388181: Remove virtual keyboard support from input_method_descriptor.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/logging.h" 5 #include "base/logging.h"
6 #include "chrome/browser/chromeos/input_method/input_method_whitelist.h" 6 #include "chrome/browser/chromeos/input_method/input_method_whitelist.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace chromeos { 9 namespace chromeos {
10 namespace input_method { 10 namespace input_method {
(...skipping 10 matching lines...) Expand all
21 TEST_F(InputMethodWhitelistTest, TestInputMethodIdIsWhitelisted) { 21 TEST_F(InputMethodWhitelistTest, TestInputMethodIdIsWhitelisted) {
22 EXPECT_TRUE(whitelist_.InputMethodIdIsWhitelisted("mozc")); 22 EXPECT_TRUE(whitelist_.InputMethodIdIsWhitelisted("mozc"));
23 EXPECT_TRUE(whitelist_.InputMethodIdIsWhitelisted("xkb:us:dvorak:eng")); 23 EXPECT_TRUE(whitelist_.InputMethodIdIsWhitelisted("xkb:us:dvorak:eng"));
24 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted("mozc,")); 24 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted("mozc,"));
25 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted("mozc,xkb:us:dvorak:eng")); 25 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted("mozc,xkb:us:dvorak:eng"));
26 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted("not-supported-id")); 26 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted("not-supported-id"));
27 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted(",")); 27 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted(","));
28 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted("")); 28 EXPECT_FALSE(whitelist_.InputMethodIdIsWhitelisted(""));
29 } 29 }
30 30
31 TEST_F(InputMethodWhitelistTest, TestXkbLayoutIsSupported) {
32 EXPECT_TRUE(whitelist_.XkbLayoutIsSupported("us"));
33 EXPECT_TRUE(whitelist_.XkbLayoutIsSupported("us(dvorak)"));
34 EXPECT_TRUE(whitelist_.XkbLayoutIsSupported("fr"));
35 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("us,"));
36 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("us,fr"));
37 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("xkb:us:dvorak:eng"));
38 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("mozc"));
39 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported(","));
40 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported(""));
41 }
42
43 } // namespace input_method 31 } // namespace input_method
44 } // namespace chromeos 32 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698