OLD | NEW |
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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 logger, | 191 logger, |
192 new net::TestNetLog(), | 192 new net::TestNetLog(), |
193 device_capabilities) {} | 193 device_capabilities) {} |
194 | 194 |
195 TestCastSocket(const net::IPEndPoint& ip_endpoint, | 195 TestCastSocket(const net::IPEndPoint& ip_endpoint, |
196 ChannelAuthType channel_auth, | 196 ChannelAuthType channel_auth, |
197 int64_t timeout_ms, | 197 int64_t timeout_ms, |
198 Logger* logger, | 198 Logger* logger, |
199 net::TestNetLog* capturing_net_log, | 199 net::TestNetLog* capturing_net_log, |
200 uint64_t device_capabilities) | 200 uint64_t device_capabilities) |
201 : CastSocketImpl("some_extension_id", | 201 : CastSocketImpl(ip_endpoint, |
202 ip_endpoint, | |
203 channel_auth, | 202 channel_auth, |
204 capturing_net_log, | 203 capturing_net_log, |
205 base::TimeDelta::FromMilliseconds(timeout_ms), | 204 base::TimeDelta::FromMilliseconds(timeout_ms), |
206 false, | 205 false, |
207 logger, | 206 logger, |
208 device_capabilities, | 207 device_capabilities, |
209 AuthContext::Create()), | 208 AuthContext::Create()), |
210 capturing_net_log_(capturing_net_log), | 209 capturing_net_log_(capturing_net_log), |
211 ip_(ip_endpoint), | 210 ip_(ip_endpoint), |
212 extract_cert_result_(true), | 211 extract_cert_result_(true), |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 socket_->transport()->SendMessage( | 770 socket_->transport()->SendMessage( |
772 test_message, base::Bind(&CompleteHandler::OnWriteComplete, | 771 test_message, base::Bind(&CompleteHandler::OnWriteComplete, |
773 base::Unretained(&handler_))); | 772 base::Unretained(&handler_))); |
774 RunPendingTasks(); | 773 RunPendingTasks(); |
775 | 774 |
776 EXPECT_EQ(ReadyState::OPEN, socket_->ready_state()); | 775 EXPECT_EQ(ReadyState::OPEN, socket_->ready_state()); |
777 EXPECT_EQ(ChannelError::NONE, socket_->error_state()); | 776 EXPECT_EQ(ChannelError::NONE, socket_->error_state()); |
778 } | 777 } |
779 | 778 |
780 } // namespace cast_channel | 779 } // namespace cast_channel |
OLD | NEW |