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

Unified Diff: blimp/common/logging_unittest.cc

Issue 2018243002: Add logger for ImeFeature messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@addFakeImeDelegate
Patch Set: Remove blank line Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/common/logging.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/common/logging_unittest.cc
diff --git a/blimp/common/logging_unittest.cc b/blimp/common/logging_unittest.cc
index 6d2edbd4be950de464de2ea39941380cf1729615..ed3a383ca1abfaf47e976be2ca18e43a99917286 100644
--- a/blimp/common/logging_unittest.cc
+++ b/blimp/common/logging_unittest.cc
@@ -247,5 +247,30 @@ TEST_F(LoggingTest, Settings) {
message);
}
+TEST_F(LoggingTest, Ime) {
+ BlimpMessage message;
+ message.mutable_ime()->set_render_widget_id(1);
+
+ // Test SHOW_IME.
+ message.mutable_ime()->set_type(ImeMessage::SHOW_IME);
+ message.mutable_ime()->set_text_input_type(ImeMessage::NONE);
+ VerifyLogOutput(
+ "type=IME render_widget_id=1 subtype=SHOW_IME text_input_type=0",
+ message);
+
+ // Test HIDE_IME.
+ message.mutable_ime()->set_type(ImeMessage::HIDE_IME);
+ VerifyLogOutput(
+ "type=IME render_widget_id=1 subtype=HIDE_IME",
+ message);
+
+ // Test SET_TEXT.
+ message.mutable_ime()->set_type(ImeMessage::SET_TEXT);
+ message.mutable_ime()->set_ime_text("1234");
+ VerifyLogOutput(
+ "type=IME render_widget_id=1 subtype=SET_TEXT ime_text(length)=4",
+ message);
+}
+
} // namespace
} // namespace blimp
« no previous file with comments | « blimp/common/logging.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698