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

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

Issue 419293002: IME refactoring: ChromeOS introduce input methods State. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 6 years, 4 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 023ff7502e494a4bccd37aede40c35f909efcda9..5731558617bdc34a6456d78b1facbe6b8bce69a6 100644
--- a/chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc
+++ b/chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc
@@ -126,8 +126,8 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, Bounds) {
extension_ime_util::GetInputMethodIDByEngineID("xkb:fr::fra"));
// Add keyboard layouts to enable the mode indicator.
- imm->EnableLoginLayouts("fr", keyboard_layouts);
- ASSERT_LT(1UL, imm->GetNumActiveInputMethods());
+ imm->GetActiveIMEState()->EnableLoginLayouts("fr", keyboard_layouts);
+ ASSERT_LT(1UL, imm->GetActiveIMEState()->GetNumActiveInputMethods());
chromeos::IMECandidateWindowHandlerInterface* candidate_window =
chromeos::IMEBridge::Get()->GetCandidateWindowHandler();
@@ -139,7 +139,7 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, Bounds) {
{
ScopedModeIndicatorObserverForTesting observer;
candidate_window->SetCursorBounds(cursor1_bounds, cursor1_bounds);
- EXPECT_TRUE(imm->SwitchToNextInputMethod());
+ EXPECT_TRUE(imm->GetActiveIMEState()->SwitchToNextInputMethod());
mi1_bounds = observer.last_bounds();
// The bounds should be bigger than the inner size.
EXPECT_LE(kInnerSize, mi1_bounds.width());
@@ -154,7 +154,7 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, Bounds) {
{
ScopedModeIndicatorObserverForTesting observer;
candidate_window->SetCursorBounds(cursor2_bounds, cursor2_bounds);
- EXPECT_TRUE(imm->SwitchToNextInputMethod());
+ EXPECT_TRUE(imm->GetActiveIMEState()->SwitchToNextInputMethod());
mi2_bounds = observer.last_bounds();
EXPECT_TRUE(observer.is_displayed());
}
@@ -176,7 +176,7 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, Bounds) {
{
ScopedModeIndicatorObserverForTesting observer;
candidate_window->SetCursorBounds(cursor3_bounds, cursor3_bounds);
- EXPECT_TRUE(imm->SwitchToNextInputMethod());
+ EXPECT_TRUE(imm->GetActiveIMEState()->SwitchToNextInputMethod());
mi3_bounds = observer.last_bounds();
EXPECT_TRUE(observer.is_displayed());
EXPECT_LT(mi3_bounds.bottom(), screen_bounds.bottom());
@@ -194,8 +194,8 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, NumOfWidgets) {
extension_ime_util::GetInputMethodIDByEngineID("xkb:fr::fra"));
// Add keyboard layouts to enable the mode indicator.
- imm->EnableLoginLayouts("fr", keyboard_layouts);
- ASSERT_LT(1UL, imm->GetNumActiveInputMethods());
+ imm->GetActiveIMEState()->EnableLoginLayouts("fr", keyboard_layouts);
+ ASSERT_LT(1UL, imm->GetActiveIMEState()->GetNumActiveInputMethods());
chromeos::IMECandidateWindowHandlerInterface* candidate_window =
chromeos::IMEBridge::Get()->GetCandidateWindowHandler();
@@ -204,11 +204,11 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, NumOfWidgets) {
{
ScopedModeIndicatorObserverForTesting observer;
- EXPECT_TRUE(imm->SwitchToNextInputMethod());
+ EXPECT_TRUE(imm->GetActiveIMEState()->SwitchToNextInputMethod());
EXPECT_EQ(1UL, observer.max_widget_list_size());
const views::Widget* widget1 = observer.widget_list()[0];
- EXPECT_TRUE(imm->SwitchToNextInputMethod());
+ EXPECT_TRUE(imm->GetActiveIMEState()->SwitchToNextInputMethod());
EXPECT_EQ(2UL, observer.max_widget_list_size());
// When a new mode indicator is displayed, the previous one should be

Powered by Google App Engine
This is Rietveld 408576698