diff options
author | pkotwicz <pkotwicz@chromium.org> | 2014-12-08 16:51:24 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-09 00:51:40 +0000 |
commit | 8723017c54dad1aa72e07855789b60128abc435a (patch) | |
tree | 8df0f9b2a0c5741aa44bf4468cae1216b6904711 /chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc | |
parent | 6a7f826357db40b6a0343acfb8dd9001a6511a6d (diff) | |
download | chromium_src-8723017c54dad1aa72e07855789b60128abc435a.zip chromium_src-8723017c54dad1aa72e07855789b60128abc435a.tar.gz chromium_src-8723017c54dad1aa72e07855789b60128abc435a.tar.bz2 |
Split AcceleratorController::PerformAction() into
- AcceleratorController::CanPerformAction()
- AcceleratorController::PerformAction()
- AcceleratorController::ShouldActionConsumeKeyEvent()
This is a stepping stone to refactoring AcceleratorTarget.
BUG=404473
TEST=None
Review URL: https://codereview.chromium.org/734283002
Cr-Commit-Position: refs/heads/master@{#307388}
Diffstat (limited to 'chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc')
-rw-r--r-- | chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc b/chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc index 0ef434a..244feb5 100644 --- a/chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc +++ b/chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc @@ -128,6 +128,7 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, Bounds) { // Add keyboard layouts to enable the mode indicator. imm->GetActiveIMEState()->EnableLoginLayouts("fr", keyboard_layouts); ASSERT_LT(1UL, imm->GetActiveIMEState()->GetNumActiveInputMethods()); + EXPECT_TRUE(imm->GetActiveIMEState()->CanCycleInputMethod()); chromeos::IMECandidateWindowHandlerInterface* candidate_window = chromeos::IMEBridge::Get()->GetCandidateWindowHandler(); @@ -139,7 +140,7 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, Bounds) { { ScopedModeIndicatorObserverForTesting observer; candidate_window->SetCursorBounds(cursor1_bounds, cursor1_bounds); - EXPECT_TRUE(imm->GetActiveIMEState()->SwitchToNextInputMethod()); + 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 +155,7 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, Bounds) { { ScopedModeIndicatorObserverForTesting observer; candidate_window->SetCursorBounds(cursor2_bounds, cursor2_bounds); - EXPECT_TRUE(imm->GetActiveIMEState()->SwitchToNextInputMethod()); + imm->GetActiveIMEState()->SwitchToNextInputMethod(); mi2_bounds = observer.last_bounds(); EXPECT_TRUE(observer.is_displayed()); } @@ -176,7 +177,7 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, Bounds) { { ScopedModeIndicatorObserverForTesting observer; candidate_window->SetCursorBounds(cursor3_bounds, cursor3_bounds); - EXPECT_TRUE(imm->GetActiveIMEState()->SwitchToNextInputMethod()); + imm->GetActiveIMEState()->SwitchToNextInputMethod(); mi3_bounds = observer.last_bounds(); EXPECT_TRUE(observer.is_displayed()); EXPECT_LT(mi3_bounds.bottom(), screen_bounds.bottom()); @@ -196,6 +197,7 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, NumOfWidgets) { // Add keyboard layouts to enable the mode indicator. imm->GetActiveIMEState()->EnableLoginLayouts("fr", keyboard_layouts); ASSERT_LT(1UL, imm->GetActiveIMEState()->GetNumActiveInputMethods()); + EXPECT_TRUE(imm->GetActiveIMEState()->CanCycleInputMethod()); chromeos::IMECandidateWindowHandlerInterface* candidate_window = chromeos::IMEBridge::Get()->GetCandidateWindowHandler(); @@ -204,11 +206,11 @@ IN_PROC_BROWSER_TEST_F(ModeIndicatorBrowserTest, NumOfWidgets) { { ScopedModeIndicatorObserverForTesting observer; - EXPECT_TRUE(imm->GetActiveIMEState()->SwitchToNextInputMethod()); + imm->GetActiveIMEState()->SwitchToNextInputMethod(); EXPECT_EQ(1UL, observer.max_widget_list_size()); const views::Widget* widget1 = observer.widget_list()[0]; - EXPECT_TRUE(imm->GetActiveIMEState()->SwitchToNextInputMethod()); + imm->GetActiveIMEState()->SwitchToNextInputMethod(); EXPECT_EQ(2UL, observer.max_widget_list_size()); // When a new mode indicator is displayed, the previous one should be |