Index: blimp/common/logging_unittest.cc |
diff --git a/blimp/common/logging_unittest.cc b/blimp/common/logging_unittest.cc |
index d14f748d64df7c7a4e0e5c357ee97d4b419fe120..1c14b7b1698d2e231066b72d15a635d77b6e81c2 100644 |
--- a/blimp/common/logging_unittest.cc |
+++ b/blimp/common/logging_unittest.cc |
@@ -43,7 +43,7 @@ class LoggingTest : public testing::Test { |
TEST_F(LoggingTest, Compositor) { |
BlimpMessage base_msg; |
- base_msg.set_type(BlimpMessage::COMPOSITOR); |
+ base_msg.mutable_compositor(); |
base_msg.set_target_tab_id(kTargetTab); |
VerifyLogOutput("type=COMPOSITOR render_widget_id=0 target_tab_id=123", |
base_msg); |
@@ -55,7 +55,6 @@ TEST_F(LoggingTest, Input) { |
" target_tab_id=123"; |
BlimpMessage base_msg; |
- base_msg.set_type(BlimpMessage::INPUT); |
base_msg.set_target_tab_id(kTargetTab); |
base_msg.mutable_input()->set_type(InputMessage::Type_GestureScrollBegin); |
base_msg.mutable_input()->set_render_widget_id(1); |
@@ -102,7 +101,6 @@ TEST_F(LoggingTest, Input) { |
TEST_F(LoggingTest, Navigation) { |
BlimpMessage base_msg; |
- base_msg.set_type(BlimpMessage::NAVIGATION); |
base_msg.set_target_tab_id(kTargetTab); |
BlimpMessage navigation_state_msg = base_msg; |
@@ -152,7 +150,6 @@ TEST_F(LoggingTest, Navigation) { |
TEST_F(LoggingTest, TabControl) { |
BlimpMessage base_msg; |
- base_msg.set_type(BlimpMessage::TAB_CONTROL); |
base_msg.set_target_tab_id(kTargetTab); |
BlimpMessage create_tab_msg = base_msg; |
@@ -177,11 +174,9 @@ TEST_F(LoggingTest, TabControl) { |
TEST_F(LoggingTest, ProtocolControl) { |
BlimpMessage base_msg; |
- base_msg.set_type(BlimpMessage::PROTOCOL_CONTROL); |
BlimpMessage start_connection_msg = base_msg; |
- start_connection_msg.mutable_protocol_control()->set_type( |
- ProtocolControlMessage::START_CONNECTION); |
+ start_connection_msg.mutable_protocol_control()->mutable_start_connection(); |
start_connection_msg.mutable_protocol_control() |
->mutable_start_connection() |
->set_client_token("token"); |
@@ -193,9 +188,7 @@ TEST_F(LoggingTest, ProtocolControl) { |
"client_token=\"token\" protocol_version=2", |
start_connection_msg); |
- BlimpMessage checkpoint_msg = base_msg; |
- start_connection_msg.mutable_protocol_control()->set_type( |
- ProtocolControlMessage::CHECKPOINT_ACK); |
+ start_connection_msg.mutable_protocol_control()->mutable_checkpoint_ack(); |
start_connection_msg.mutable_protocol_control() |
->mutable_checkpoint_ack() |
->set_checkpoint_id(123); |
@@ -207,7 +200,6 @@ TEST_F(LoggingTest, ProtocolControl) { |
TEST_F(LoggingTest, RenderWidget) { |
BlimpMessage base_msg; |
- base_msg.set_type(BlimpMessage::RENDER_WIDGET); |
base_msg.mutable_render_widget()->set_render_widget_id(123); |
BlimpMessage initialize_msg = base_msg; |
@@ -230,7 +222,6 @@ TEST_F(LoggingTest, RenderWidget) { |
TEST_F(LoggingTest, Settings) { |
BlimpMessage message; |
- message.set_type(BlimpMessage::SETTINGS); |
message.mutable_settings() |
->mutable_engine_settings() |
->set_record_whole_document(true); |