OLD | NEW |
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 #if defined(USE_VIRTUAL_KEYBOARD) | |
10 // Since USE_VIRTUAL_KEYBOARD build only supports a few keyboard layouts, we | |
11 // skip the tests for now. | |
12 #define TestInputMethodIdIsWhitelisted DISABLED_TestInputMethodIdIsWhitelisted | |
13 #define TestXkbLayoutIsSupported DISABLED_TestXkbLayoutIsSupported | |
14 #endif // USE_VIRTUAL_KEYBOARD | |
15 | |
16 namespace chromeos { | 9 namespace chromeos { |
17 namespace input_method { | 10 namespace input_method { |
18 | 11 |
19 namespace { | 12 namespace { |
20 | 13 |
21 class InputMethodWhitelistTest : public testing::Test { | 14 class InputMethodWhitelistTest : public testing::Test { |
22 protected: | 15 protected: |
23 const InputMethodWhitelist whitelist_; | 16 const InputMethodWhitelist whitelist_; |
24 }; | 17 }; |
25 | 18 |
(...skipping 16 matching lines...) Expand all Loading... |
42 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("us,")); | 35 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("us,")); |
43 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("us,fr")); | 36 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("us,fr")); |
44 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("xkb:us:dvorak:eng")); | 37 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("xkb:us:dvorak:eng")); |
45 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("mozc")); | 38 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("mozc")); |
46 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported(",")); | 39 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported(",")); |
47 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("")); | 40 EXPECT_FALSE(whitelist_.XkbLayoutIsSupported("")); |
48 } | 41 } |
49 | 42 |
50 } // namespace input_method | 43 } // namespace input_method |
51 } // namespace chromeos | 44 } // namespace chromeos |
OLD | NEW |