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

Side by Side Diff: blimp/common/logging_unittest.cc

Issue 1912983002: Add pretty-printing for SETTINGS messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/logging.h" 10 #include "blimp/common/logging.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 RenderWidgetMessage::CREATED); 221 RenderWidgetMessage::CREATED);
222 VerifyLogOutput("type=RENDER_WIDGET subtype=CREATED render_widget_id=123", 222 VerifyLogOutput("type=RENDER_WIDGET subtype=CREATED render_widget_id=123",
223 created_msg); 223 created_msg);
224 224
225 BlimpMessage deleted_msg = base_msg; 225 BlimpMessage deleted_msg = base_msg;
226 deleted_msg.mutable_render_widget()->set_type(RenderWidgetMessage::DELETED); 226 deleted_msg.mutable_render_widget()->set_type(RenderWidgetMessage::DELETED);
227 VerifyLogOutput("type=RENDER_WIDGET subtype=DELETED render_widget_id=123", 227 VerifyLogOutput("type=RENDER_WIDGET subtype=DELETED render_widget_id=123",
228 deleted_msg); 228 deleted_msg);
229 } 229 }
230 230
231 TEST_F(LoggingTest, Settings) {
232 BlimpMessage message;
233 message.set_type(BlimpMessage::SETTINGS);
234 message.mutable_settings()
235 ->mutable_engine_settings()
236 ->set_record_whole_document(true);
237 message.mutable_settings()->mutable_engine_settings()->set_client_os_info(
238 "wibble");
239 VerifyLogOutput(
240 "type=SETTINGS subtype=ENGINE_SETTINGS record_whole_document=true "
241 "client_os_info=\"wibble\"",
242 message);
243 }
244
231 } // namespace 245 } // namespace
232 } // namespace blimp 246 } // 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