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

Unified Diff: chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc

Issue 190033005: [IME] Removes the duplicated IMEs in chrome://settings/languages, and support async component IMEs … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try to make test green. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc
diff --git a/chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc b/chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc
index 46890cd70808a5e359845719bec58503ca599bb7..b8bf3b4464cc3eb543a0c2c74d4751a0d5ec4127 100644
--- a/chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc
+++ b/chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc
@@ -5,10 +5,13 @@
#include <algorithm>
#include "ash/shell.h"
+#include "chrome/browser/chromeos/input_method/input_method_util.h"
#include "chrome/browser/chromeos/input_method/mode_indicator_controller.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chromeos/ime/component_extension_ime_manager.h"
+#include "chromeos/ime/extension_ime_util.h"
#include "chromeos/ime/input_method_manager.h"
+#include "chromeos/ime/input_method_whitelist.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -96,6 +99,9 @@ class ModeIndicatorBrowserTest : public InProcessBrowserTest {
}
void InitializeIMF() {
+ InputMethodManager::Get()
+ ->GetInputMethodUtil()
+ ->InitXkbInputMethodsForTesting();
// Make sure ComponentExtensionIMEManager is initialized.
// ComponentExtensionIMEManagerImpl::InitializeAsync posts
// ReadComponentExtensionsInfo to the FILE thread for the
@@ -126,7 +132,8 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, Bounds) {
ASSERT_TRUE(imm);
std::vector<std::string> keyboard_layouts;
- keyboard_layouts.push_back("xkb:fr::fra");
+ keyboard_layouts.push_back(
+ extension_ime_util::GetInputMethodIDByKeyboardLayout("xkb:fr::fra"));
// Add keyboard layouts to enable the mode indicator.
imm->EnableLoginLayouts("fr", keyboard_layouts);
@@ -193,7 +200,8 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, NumOfWidgets) {
ASSERT_TRUE(imm);
std::vector<std::string> keyboard_layouts;
- keyboard_layouts.push_back("xkb:fr::fra");
+ keyboard_layouts.push_back(
+ extension_ime_util::GetInputMethodIDByKeyboardLayout("xkb:fr::fra"));
// Add keyboard layouts to enable the mode indicator.
imm->EnableLoginLayouts("fr", keyboard_layouts);

Powered by Google App Engine
This is Rietveld 408576698