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

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

Issue 10544070: Add decoration to the language button to indicate that a third party IME is in use (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests Created 8 years, 6 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/ibus_ui_controller.h" 6 #include "chrome/browser/chromeos/input_method/ibus_ui_controller.h"
7 #include "chrome/browser/chromeos/input_method/input_method_descriptor.h" 7 #include "chrome/browser/chromeos/input_method/input_method_descriptor.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
11 namespace input_method { 11 namespace input_method {
12 12
13 // TODO(nona): Add more tests (crosbug.com/26334). 13 // TODO(nona): Add more tests (crosbug.com/26334).
14 14
15 TEST(IBusUiControllerTest, TestIsActive) { 15 TEST(IBusUiControllerTest, TestIsActive) {
16 InputMethodDescriptors descriptors; 16 InputMethodDescriptors descriptors;
17 EXPECT_FALSE(IsActiveForTesting("mozc", &descriptors)); 17 EXPECT_FALSE(IsActiveForTesting("mozc", &descriptors));
18 descriptors.push_back(InputMethodDescriptor("mozc", "name", "us", "en-US")); 18 descriptors.push_back(
19 InputMethodDescriptor("mozc", "name", "us", "en-US", false));
19 EXPECT_TRUE(IsActiveForTesting("mozc", &descriptors)); 20 EXPECT_TRUE(IsActiveForTesting("mozc", &descriptors));
20 EXPECT_FALSE(IsActiveForTesting("mozc-jp", &descriptors)); 21 EXPECT_FALSE(IsActiveForTesting("mozc-jp", &descriptors));
21 descriptors.push_back( 22 descriptors.push_back(
22 InputMethodDescriptor("xkb:us::eng", "name", "us", "en-US")); 23 InputMethodDescriptor("xkb:us::eng", "name", "us", "en-US", false));
23 EXPECT_TRUE(IsActiveForTesting("xkb:us::eng", &descriptors)); 24 EXPECT_TRUE(IsActiveForTesting("xkb:us::eng", &descriptors));
24 EXPECT_TRUE(IsActiveForTesting("mozc", &descriptors)); 25 EXPECT_TRUE(IsActiveForTesting("mozc", &descriptors));
25 EXPECT_FALSE(IsActiveForTesting("mozc-jp", &descriptors)); 26 EXPECT_FALSE(IsActiveForTesting("mozc-jp", &descriptors));
26 } 27 }
27 28
28 } // namespace input_method 29 } // namespace input_method
29 } // namespace chromeos 30 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_delegate.cc ('k') | chrome/browser/chromeos/input_method/input_method_descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698