OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 session_->SignalDataChannelOpenMessage.connect( | 390 session_->SignalDataChannelOpenMessage.connect( |
391 this, &WebRtcSessionTest::OnDataChannelOpenMessage); | 391 this, &WebRtcSessionTest::OnDataChannelOpenMessage); |
392 session_->GetOnDestroyedSignal()->connect( | 392 session_->GetOnDestroyedSignal()->connect( |
393 this, &WebRtcSessionTest::OnSessionDestroyed); | 393 this, &WebRtcSessionTest::OnSessionDestroyed); |
394 | 394 |
395 EXPECT_EQ(PeerConnectionInterface::kIceConnectionNew, | 395 EXPECT_EQ(PeerConnectionInterface::kIceConnectionNew, |
396 observer_.ice_connection_state_); | 396 observer_.ice_connection_state_); |
397 EXPECT_EQ(PeerConnectionInterface::kIceGatheringNew, | 397 EXPECT_EQ(PeerConnectionInterface::kIceGatheringNew, |
398 observer_.ice_gathering_state_); | 398 observer_.ice_gathering_state_); |
399 | 399 |
400 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator( | 400 EXPECT_TRUE(session_->Initialize(options_, std::move(dtls_identity_store), |
401 dtls_identity_store ? new webrtc::RTCCertificateGeneratorStoreWrapper( | |
402 std::move(dtls_identity_store)) : nullptr); | |
403 EXPECT_TRUE(session_->Initialize(options_, std::move(cert_generator), | |
404 configuration_)); | 401 configuration_)); |
405 session_->set_metrics_observer(metrics_observer_); | 402 session_->set_metrics_observer(metrics_observer_); |
406 } | 403 } |
407 | 404 |
408 void OnDataChannelOpenMessage(const std::string& label, | 405 void OnDataChannelOpenMessage(const std::string& label, |
409 const InternalDataChannelInit& config) { | 406 const InternalDataChannelInit& config) { |
410 last_data_channel_label_ = label; | 407 last_data_channel_label_ = label; |
411 last_data_channel_config_ = config; | 408 last_data_channel_config_ = config; |
412 } | 409 } |
413 | 410 |
(...skipping 4006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4420 } | 4417 } |
4421 | 4418 |
4422 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4419 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
4423 // currently fails because upon disconnection and reconnection OnIceComplete is | 4420 // currently fails because upon disconnection and reconnection OnIceComplete is |
4424 // called more than once without returning to IceGatheringGathering. | 4421 // called more than once without returning to IceGatheringGathering. |
4425 | 4422 |
4426 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4423 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
4427 WebRtcSessionTest, | 4424 WebRtcSessionTest, |
4428 testing::Values(ALREADY_GENERATED, | 4425 testing::Values(ALREADY_GENERATED, |
4429 DTLS_IDENTITY_STORE)); | 4426 DTLS_IDENTITY_STORE)); |
OLD | NEW |