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

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

Issue 1492643003: [Blimp Net] Add EngineAuthHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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/create_blimp_message.cc ('k') | blimp/common/proto/BUILD.gn » ('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 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 "blimp/common/create_blimp_message.h" 5 #include "blimp/common/create_blimp_message.h"
6 #include "blimp/common/proto/blimp_message.pb.h" 6 #include "blimp/common/proto/blimp_message.pb.h"
7 #include "blimp/common/proto/compositor.pb.h" 7 #include "blimp/common/proto/compositor.pb.h"
8 #include "blimp/common/proto/input.pb.h" 8 #include "blimp/common/proto/input.pb.h"
9 #include "blimp/common/proto/render_widget.pb.h" 9 #include "blimp/common/proto/render_widget.pb.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 22 matching lines...) Expand all
33 33
34 TEST(CreateBlimpMessageTest, RenderWidgetMessage) { 34 TEST(CreateBlimpMessageTest, RenderWidgetMessage) {
35 RenderWidgetMessage* details = nullptr; 35 RenderWidgetMessage* details = nullptr;
36 scoped_ptr<BlimpMessage> message = CreateBlimpMessage(&details, kTabId); 36 scoped_ptr<BlimpMessage> message = CreateBlimpMessage(&details, kTabId);
37 EXPECT_NE(nullptr, details); 37 EXPECT_NE(nullptr, details);
38 EXPECT_NE(nullptr, message); 38 EXPECT_NE(nullptr, message);
39 EXPECT_EQ(details, message->mutable_render_widget()); 39 EXPECT_EQ(details, message->mutable_render_widget());
40 EXPECT_EQ(kTabId, message->target_tab_id()); 40 EXPECT_EQ(kTabId, message->target_tab_id());
41 } 41 }
42 42
43 TEST(CreateBlimpMessageTest, StartConnectionMessage) {
44 const char* client_token = "token";
45 const int protocol_version = 1;
46 scoped_ptr<BlimpMessage> message =
47 CreateStartConnectionMessage(client_token, protocol_version);
48 EXPECT_NE(nullptr, message);
49 EXPECT_EQ(BlimpMessage::PROTOCOL_CONTROL, message->type());
50 EXPECT_EQ(ProtocolControlMessage::START_CONNECTION,
51 message->protocol_control().type());
52 EXPECT_EQ(client_token,
53 message->protocol_control().start_connection().client_token());
54 EXPECT_EQ(protocol_version,
55 message->protocol_control().start_connection().protocol_version());
56 }
57
43 } // namespace 58 } // namespace
44 } // namespace blimp 59 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/common/create_blimp_message.cc ('k') | blimp/common/proto/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698