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

Side by Side Diff: components/copresence/rpc/rpc_handler_unittest.cc

Issue 598053003: Switching to C++11 template syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « components/copresence/rpc/rpc_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/copresence/rpc/rpc_handler.h" 5 #include "components/copresence/rpc/rpc_handler.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 protected: 181 protected:
182 // For rpc_handler_.invalid_audio_token_cache_ 182 // For rpc_handler_.invalid_audio_token_cache_
183 base::MessageLoop message_loop_; 183 base::MessageLoop message_loop_;
184 184
185 RpcHandler rpc_handler_; 185 RpcHandler rpc_handler_;
186 CopresenceStatus status_; 186 CopresenceStatus status_;
187 std::string api_key_; 187 std::string api_key_;
188 188
189 std::string rpc_name_; 189 std::string rpc_name_;
190 scoped_ptr<MessageLite> request_proto_; 190 scoped_ptr<MessageLite> request_proto_;
191 std::map<std::string, std::vector<Message> > messages_by_subscription_; 191 std::map<std::string, std::vector<Message>> messages_by_subscription_;
192 }; 192 };
193 193
194 TEST_F(RpcHandlerTest, Initialize) { 194 TEST_F(RpcHandlerTest, Initialize) {
195 SetDeviceId(""); 195 SetDeviceId("");
196 rpc_handler_.Initialize(RpcHandler::SuccessCallback()); 196 rpc_handler_.Initialize(RpcHandler::SuccessCallback());
197 RegisterDeviceRequest* registration = 197 RegisterDeviceRequest* registration =
198 static_cast<RegisterDeviceRequest*>(request_proto_.get()); 198 static_cast<RegisterDeviceRequest*>(request_proto_.get());
199 Identity identity = registration->device_identifiers().registrant(); 199 Identity identity = registration->device_identifiers().registrant();
200 EXPECT_EQ(CHROME, identity.type()); 200 EXPECT_EQ(CHROME, identity.type());
201 EXPECT_FALSE(identity.chrome_id().empty()); 201 EXPECT_FALSE(identity.chrome_id().empty());
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 messages_by_subscription_["Subscription 2"][1].payload()); 338 messages_by_subscription_["Subscription 2"][1].payload());
339 339
340 ASSERT_EQ(2U, directive_handler->added_directives().size()); 340 ASSERT_EQ(2U, directive_handler->added_directives().size());
341 EXPECT_EQ("Subscription 1", 341 EXPECT_EQ("Subscription 1",
342 directive_handler->added_directives()[0].subscription_id()); 342 directive_handler->added_directives()[0].subscription_id());
343 EXPECT_EQ("Subscription 2", 343 EXPECT_EQ("Subscription 2",
344 directive_handler->added_directives()[1].subscription_id()); 344 directive_handler->added_directives()[1].subscription_id());
345 } 345 }
346 346
347 } // namespace copresence 347 } // namespace copresence
OLDNEW
« no previous file with comments | « components/copresence/rpc/rpc_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698