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

Side by Side Diff: components/cast_channel/cast_socket_unittest.cc

Issue 2937153002: [cast_channel] Create KeepAliveDelegate in CastSocket instead of in CastChannelOpenFunction (Closed)
Patch Set: rebase with master Created 3 years, 6 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 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/cast_channel/cast_socket.h" 5 #include "components/cast_channel/cast_socket.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 device_capabilities) {} 187 device_capabilities) {}
188 188
189 TestCastSocket(const net::IPEndPoint& ip_endpoint, 189 TestCastSocket(const net::IPEndPoint& ip_endpoint,
190 int64_t timeout_ms, 190 int64_t timeout_ms,
191 Logger* logger, 191 Logger* logger,
192 net::TestNetLog* capturing_net_log, 192 net::TestNetLog* capturing_net_log,
193 uint64_t device_capabilities) 193 uint64_t device_capabilities)
194 : CastSocketImpl(ip_endpoint, 194 : CastSocketImpl(ip_endpoint,
195 capturing_net_log, 195 capturing_net_log,
196 base::TimeDelta::FromMilliseconds(timeout_ms), 196 base::TimeDelta::FromMilliseconds(timeout_ms),
197 false, 197 base::TimeDelta(),
198 base::TimeDelta(),
198 logger, 199 logger,
199 device_capabilities, 200 device_capabilities,
200 AuthContext::Create()), 201 AuthContext::Create()),
201 capturing_net_log_(capturing_net_log), 202 capturing_net_log_(capturing_net_log),
202 ip_(ip_endpoint), 203 ip_(ip_endpoint),
203 extract_cert_result_(true), 204 extract_cert_result_(true),
204 verify_challenge_result_(true), 205 verify_challenge_result_(true),
205 verify_challenge_disallow_(false), 206 verify_challenge_disallow_(false),
206 tcp_unresponsive_(false), 207 tcp_unresponsive_(false),
207 mock_timer_(new base::MockTimer(false, false)), 208 mock_timer_(new base::MockTimer(false, false)),
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 socket_->transport()->SendMessage( 763 socket_->transport()->SendMessage(
763 test_message, base::Bind(&CompleteHandler::OnWriteComplete, 764 test_message, base::Bind(&CompleteHandler::OnWriteComplete,
764 base::Unretained(&handler_))); 765 base::Unretained(&handler_)));
765 RunPendingTasks(); 766 RunPendingTasks();
766 767
767 EXPECT_EQ(ReadyState::OPEN, socket_->ready_state()); 768 EXPECT_EQ(ReadyState::OPEN, socket_->ready_state());
768 EXPECT_EQ(ChannelError::NONE, socket_->error_state()); 769 EXPECT_EQ(ChannelError::NONE, socket_->error_state());
769 } 770 }
770 771
771 } // namespace cast_channel 772 } // namespace cast_channel
OLDNEW
« no previous file with comments | « components/cast_channel/cast_socket.cc ('k') | extensions/browser/api/cast_channel/cast_channel_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698