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

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

Issue 1970463004: Blimp: Add BlobChannel Helium messages and delegate impls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: haibinlu feedback Created 4 years, 7 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
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 EXPECT_NE(nullptr, message); 85 EXPECT_NE(nullptr, message);
85 EXPECT_EQ(BlimpMessage::PROTOCOL_CONTROL, message->type()); 86 EXPECT_EQ(BlimpMessage::PROTOCOL_CONTROL, message->type());
86 EXPECT_EQ(ProtocolControlMessage::START_CONNECTION, 87 EXPECT_EQ(ProtocolControlMessage::START_CONNECTION,
87 message->protocol_control().type()); 88 message->protocol_control().type());
88 EXPECT_EQ(client_token, 89 EXPECT_EQ(client_token,
89 message->protocol_control().start_connection().client_token()); 90 message->protocol_control().start_connection().client_token());
90 EXPECT_EQ(protocol_version, 91 EXPECT_EQ(protocol_version,
91 message->protocol_control().start_connection().protocol_version()); 92 message->protocol_control().start_connection().protocol_version());
92 } 93 }
93 94
95 TEST(CreateBlimpMessageTest, BlobChannelMessage) {
96 BlobChannelMessage* details = new BlobChannelMessage;
97 std::unique_ptr<BlimpMessage> message =
98 CreateBlimpMessage(base::WrapUnique(details));
99 EXPECT_NE(nullptr, message);
Wez 2016/05/20 21:46:17 nit: EXPECT_TRUE(message) or even ASSERT_TRUE(mess
100 EXPECT_EQ(details, &message->blob_channel());
101 EXPECT_EQ(BlimpMessage::BLOB_CHANNEL, message->type());
102 }
103
104
94 } // namespace 105 } // namespace
95 } // namespace blimp 106 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698