OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 ASSERT_EQ(1U, stats.channel_stats.size()); | 232 ASSERT_EQ(1U, stats.channel_stats.size()); |
233 EXPECT_EQ(1, stats.channel_stats[0].component); | 233 EXPECT_EQ(1, stats.channel_stats[0].component); |
234 // Set local transport description for FakeTransport before connecting. | 234 // Set local transport description for FakeTransport before connecting. |
235 TransportDescription faketransport_desc( | 235 TransportDescription faketransport_desc( |
236 std::vector<std::string>(), | 236 std::vector<std::string>(), |
237 rtc::CreateRandomString(cricket::ICE_UFRAG_LENGTH), | 237 rtc::CreateRandomString(cricket::ICE_UFRAG_LENGTH), |
238 rtc::CreateRandomString(cricket::ICE_PWD_LENGTH), cricket::ICEMODE_FULL, | 238 rtc::CreateRandomString(cricket::ICE_PWD_LENGTH), cricket::ICEMODE_FULL, |
239 cricket::CONNECTIONROLE_NONE, nullptr); | 239 cricket::CONNECTIONROLE_NONE, nullptr); |
240 transport_->SetLocalTransportDescription(faketransport_desc, | 240 transport_->SetLocalTransportDescription(faketransport_desc, |
241 cricket::CA_OFFER, nullptr); | 241 cricket::CA_OFFER, nullptr); |
242 transport_->ConnectChannels(); | |
243 EXPECT_TRUE(transport_->GetStats(&stats)); | 242 EXPECT_TRUE(transport_->GetStats(&stats)); |
244 ASSERT_EQ(1U, stats.channel_stats.size()); | 243 ASSERT_EQ(1U, stats.channel_stats.size()); |
245 EXPECT_EQ(1, stats.channel_stats[0].component); | 244 EXPECT_EQ(1, stats.channel_stats[0].component); |
246 } | 245 } |
247 | 246 |
248 // Tests that VerifyCertificateFingerprint only returns true when the | 247 // Tests that VerifyCertificateFingerprint only returns true when the |
249 // certificate matches the fingerprint. | 248 // certificate matches the fingerprint. |
250 TEST_F(TransportTest, TestVerifyCertificateFingerprint) { | 249 TEST_F(TransportTest, TestVerifyCertificateFingerprint) { |
251 std::string error_desc; | 250 std::string error_desc; |
252 EXPECT_FALSE( | 251 EXPECT_FALSE( |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 remote_desc.connection_role = param.remote_role; | 414 remote_desc.connection_role = param.remote_role; |
416 | 415 |
417 ASSERT_TRUE(transport_->SetRemoteTransportDescription( | 416 ASSERT_TRUE(transport_->SetRemoteTransportDescription( |
418 remote_desc, param.remote_action, nullptr)); | 417 remote_desc, param.remote_action, nullptr)); |
419 ASSERT_TRUE(transport_->SetLocalTransportDescription( | 418 ASSERT_TRUE(transport_->SetLocalTransportDescription( |
420 local_desc, param.local_action, nullptr)); | 419 local_desc, param.local_action, nullptr)); |
421 EXPECT_FALSE( | 420 EXPECT_FALSE( |
422 transport_->NegotiateRole(param.local_action, &ssl_role, &error_desc)); | 421 transport_->NegotiateRole(param.local_action, &ssl_role, &error_desc)); |
423 } | 422 } |
424 } | 423 } |
OLD | NEW |