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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « blimp/common/logging.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sstream> 5 #include <sstream>
6 #include <string> 6 #include <string>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "blimp/common/create_blimp_message.h" 10 #include "blimp/common/create_blimp_message.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 ->mutable_engine_settings() 240 ->mutable_engine_settings()
241 ->set_record_whole_document(true); 241 ->set_record_whole_document(true);
242 message.mutable_settings()->mutable_engine_settings()->set_client_os_info( 242 message.mutable_settings()->mutable_engine_settings()->set_client_os_info(
243 "wibble"); 243 "wibble");
244 VerifyLogOutput( 244 VerifyLogOutput(
245 "type=SETTINGS subtype=ENGINE_SETTINGS record_whole_document=true " 245 "type=SETTINGS subtype=ENGINE_SETTINGS record_whole_document=true "
246 "client_os_info=\"wibble\"", 246 "client_os_info=\"wibble\"",
247 message); 247 message);
248 } 248 }
249 249
250 TEST_F(LoggingTest, Ime) {
251 BlimpMessage message;
252 message.mutable_ime()->set_render_widget_id(1);
253
254 // Test SHOW_IME.
255 message.mutable_ime()->set_type(ImeMessage::SHOW_IME);
256 message.mutable_ime()->set_text_input_type(ImeMessage::NONE);
257 VerifyLogOutput(
258 "type=IME render_widget_id=1 subtype=SHOW_IME text_input_type=0",
259 message);
260
261 // Test HIDE_IME.
262 message.mutable_ime()->set_type(ImeMessage::HIDE_IME);
263 VerifyLogOutput(
264 "type=IME render_widget_id=1 subtype=HIDE_IME",
265 message);
266
267 // Test SET_TEXT.
268 message.mutable_ime()->set_type(ImeMessage::SET_TEXT);
269 message.mutable_ime()->set_ime_text("1234");
270 VerifyLogOutput(
271 "type=IME render_widget_id=1 subtype=SET_TEXT ime_text(length)=4",
272 message);
273 }
274
250 } // namespace 275 } // namespace
251 } // namespace blimp 276 } // namespace blimp
OLDNEW
« 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