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

Unified Diff: components/arc/ime/arc_ime_service_unittest.cc

Issue 2280503002: arc: Stop piggybacking "text input started" and "show virtual keyboard" events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « components/arc/ime/arc_ime_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/ime/arc_ime_service_unittest.cc
diff --git a/components/arc/ime/arc_ime_service_unittest.cc b/components/arc/ime/arc_ime_service_unittest.cc
index 7b38a873dd91655925cc216a198377f26222a4de..0cbd888452e2f15e15afd2926a1da8e83d7475da 100644
--- a/components/arc/ime/arc_ime_service_unittest.cc
+++ b/components/arc/ime/arc_ime_service_unittest.cc
@@ -142,19 +142,12 @@ TEST_F(ArcImeServiceTest, ShowImeIfNeeded) {
instance_->OnTextInputTypeChanged(ui::TEXT_INPUT_TYPE_NONE);
ASSERT_EQ(0, fake_input_method_->count_show_ime_if_needed());
+ // Text input type change does not imply the show ime request.
instance_->OnTextInputTypeChanged(ui::TEXT_INPUT_TYPE_TEXT);
- EXPECT_EQ(1, fake_input_method_->count_show_ime_if_needed());
+ EXPECT_EQ(0, fake_input_method_->count_show_ime_if_needed());
- // The type is not changing, hence no call.
- instance_->OnTextInputTypeChanged(ui::TEXT_INPUT_TYPE_TEXT);
+ instance_->ShowImeIfNeeded();
EXPECT_EQ(1, fake_input_method_->count_show_ime_if_needed());
-
- instance_->OnTextInputTypeChanged(ui::TEXT_INPUT_TYPE_SEARCH);
- EXPECT_EQ(2, fake_input_method_->count_show_ime_if_needed());
-
- // Change to NONE should not trigger the showing event.
- instance_->OnTextInputTypeChanged(ui::TEXT_INPUT_TYPE_NONE);
- EXPECT_EQ(2, fake_input_method_->count_show_ime_if_needed());
}
TEST_F(ArcImeServiceTest, CancelComposition) {
« no previous file with comments | « components/arc/ime/arc_ime_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698