| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/memory/ptr_util.h" |
| 5 #include "blimp/common/create_blimp_message.h" | 6 #include "blimp/common/create_blimp_message.h" |
| 6 #include "blimp/common/proto/blimp_message.pb.h" | 7 #include "blimp/common/proto/blimp_message.pb.h" |
| 7 #include "blimp/common/proto/compositor.pb.h" | 8 #include "blimp/common/proto/compositor.pb.h" |
| 8 #include "blimp/common/proto/input.pb.h" | 9 #include "blimp/common/proto/input.pb.h" |
| 9 #include "blimp/common/proto/navigation.pb.h" | 10 #include "blimp/common/proto/navigation.pb.h" |
| 10 #include "blimp/common/proto/render_widget.pb.h" | 11 #include "blimp/common/proto/render_widget.pb.h" |
| 11 #include "blimp/common/proto/tab_control.pb.h" | 12 #include "blimp/common/proto/tab_control.pb.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 14 |
| 14 namespace blimp { | 15 namespace blimp { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 EXPECT_NE(nullptr, message); | 86 EXPECT_NE(nullptr, message); |
| 86 EXPECT_EQ(BlimpMessage::kProtocolControl, message->feature_case()); | 87 EXPECT_EQ(BlimpMessage::kProtocolControl, message->feature_case()); |
| 87 EXPECT_EQ(ProtocolControlMessage::kStartConnection, | 88 EXPECT_EQ(ProtocolControlMessage::kStartConnection, |
| 88 message->protocol_control().connection_message_case()); | 89 message->protocol_control().connection_message_case()); |
| 89 EXPECT_EQ(client_token, | 90 EXPECT_EQ(client_token, |
| 90 message->protocol_control().start_connection().client_token()); | 91 message->protocol_control().start_connection().client_token()); |
| 91 EXPECT_EQ(protocol_version, | 92 EXPECT_EQ(protocol_version, |
| 92 message->protocol_control().start_connection().protocol_version()); | 93 message->protocol_control().start_connection().protocol_version()); |
| 93 } | 94 } |
| 94 | 95 |
| 96 TEST(CreateBlimpMessageTest, BlobChannelMessage) { |
| 97 BlobChannelMessage* details; |
| 98 std::unique_ptr<BlimpMessage> message = CreateBlimpMessage(&details); |
| 99 ASSERT_TRUE(message); |
| 100 EXPECT_EQ(details, &message->blob_channel()); |
| 101 EXPECT_EQ(BlimpMessage::kBlobChannel, message->feature_case()); |
| 102 } |
| 103 |
| 95 } // namespace | 104 } // namespace |
| 96 } // namespace blimp | 105 } // namespace blimp |
| OLD | NEW |