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

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

Issue 1840843005: blimp: Add logging for compositor and render widget feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed a test. 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') | blimp/engine/app/blimp_content_main_delegate.cc » ('j') | 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 28 matching lines...) Expand all
39 39
40 private: 40 private:
41 // Deletes the singleton on test termination. 41 // Deletes the singleton on test termination.
42 base::ShadowingAtExitManager at_exit_; 42 base::ShadowingAtExitManager at_exit_;
43 }; 43 };
44 44
45 TEST_F(LoggingTest, Compositor) { 45 TEST_F(LoggingTest, Compositor) {
46 BlimpMessage base_msg; 46 BlimpMessage base_msg;
47 base_msg.set_type(BlimpMessage::COMPOSITOR); 47 base_msg.set_type(BlimpMessage::COMPOSITOR);
48 base_msg.set_target_tab_id(kTargetTab); 48 base_msg.set_target_tab_id(kTargetTab);
49 VerifyLogOutput("type=COMPOSITOR target_tab_id=123", base_msg); 49 VerifyLogOutput("type=COMPOSITOR render_widget_id=0 target_tab_id=123",
50 base_msg);
50 } 51 }
51 52
52 TEST_F(LoggingTest, Input) { 53 TEST_F(LoggingTest, Input) {
53 BlimpMessage base_msg; 54 BlimpMessage base_msg;
54 base_msg.set_type(BlimpMessage::INPUT); 55 base_msg.set_type(BlimpMessage::INPUT);
55 base_msg.set_target_tab_id(kTargetTab); 56 base_msg.set_target_tab_id(kTargetTab);
56 VerifyLogOutput("type=INPUT target_tab_id=123", base_msg); 57 VerifyLogOutput("type=INPUT render_widget_id=0 target_tab_id=123", base_msg);
57 } 58 }
58 59
59 TEST_F(LoggingTest, Navigation) { 60 TEST_F(LoggingTest, Navigation) {
60 BlimpMessage base_msg; 61 BlimpMessage base_msg;
61 base_msg.set_type(BlimpMessage::NAVIGATION); 62 base_msg.set_type(BlimpMessage::NAVIGATION);
62 base_msg.set_target_tab_id(kTargetTab); 63 base_msg.set_target_tab_id(kTargetTab);
63 64
64 BlimpMessage navigation_state_msg = base_msg; 65 BlimpMessage navigation_state_msg = base_msg;
65 navigation_state_msg.mutable_navigation()->set_type( 66 navigation_state_msg.mutable_navigation()->set_type(
66 NavigationMessage::NAVIGATION_STATE_CHANGED); 67 NavigationMessage::NAVIGATION_STATE_CHANGED);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 created_msg); 180 created_msg);
180 181
181 BlimpMessage deleted_msg = base_msg; 182 BlimpMessage deleted_msg = base_msg;
182 deleted_msg.mutable_render_widget()->set_type(RenderWidgetMessage::DELETED); 183 deleted_msg.mutable_render_widget()->set_type(RenderWidgetMessage::DELETED);
183 VerifyLogOutput("type=RENDER_WIDGET subtype=DELETED render_widget_id=123", 184 VerifyLogOutput("type=RENDER_WIDGET subtype=DELETED render_widget_id=123",
184 deleted_msg); 185 deleted_msg);
185 } 186 }
186 187
187 } // namespace 188 } // namespace
188 } // namespace blimp 189 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/common/logging.cc ('k') | blimp/engine/app/blimp_content_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698