OLD | NEW |
---|---|
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
11 * this list of conditions and the following disclaimer in the documentation | 11 * this list of conditions and the following disclaimer in the documentation |
12 * and/or other materials provided with the distribution. | 12 * and/or other materials provided with the distribution. |
13 * 3. The name of the author may not be used to endorse or promote products | 13 * 3. The name of the author may not be used to endorse or promote products |
14 * derived from this software without specific prior written permission. | 14 * derived from this software without specific prior written permission. |
15 * | 15 * |
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED | 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
19 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 19 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 */ | 26 */ |
27 | 27 |
28 #include "talk/app/webrtc/audiotrack.h" | 28 #include "talk/app/webrtc/audiotrack.h" |
29 #include "talk/app/webrtc/dtlscertificate.h" | |
29 #include "talk/app/webrtc/fakemetricsobserver.h" | 30 #include "talk/app/webrtc/fakemetricsobserver.h" |
30 #include "talk/app/webrtc/jsepicecandidate.h" | 31 #include "talk/app/webrtc/jsepicecandidate.h" |
31 #include "talk/app/webrtc/jsepsessiondescription.h" | 32 #include "talk/app/webrtc/jsepsessiondescription.h" |
32 #include "talk/app/webrtc/mediastreamsignaling.h" | 33 #include "talk/app/webrtc/mediastreamsignaling.h" |
33 #include "talk/app/webrtc/streamcollection.h" | 34 #include "talk/app/webrtc/streamcollection.h" |
34 #include "talk/app/webrtc/test/fakeconstraints.h" | 35 #include "talk/app/webrtc/test/fakeconstraints.h" |
35 #include "talk/app/webrtc/test/fakedtlsidentitystore.h" | 36 #include "talk/app/webrtc/test/fakedtlsidentitystore.h" |
36 #include "talk/app/webrtc/test/fakemediastreamsignaling.h" | 37 #include "talk/app/webrtc/test/fakemediastreamsignaling.h" |
37 #include "talk/app/webrtc/videotrack.h" | 38 #include "talk/app/webrtc/videotrack.h" |
38 #include "talk/app/webrtc/webrtcsession.h" | 39 #include "talk/app/webrtc/webrtcsession.h" |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
352 desc_factory_->set_add_legacy_streams(false); | 353 desc_factory_->set_add_legacy_streams(false); |
353 allocator_->set_step_delay(cricket::kMinimumStepDelay); | 354 allocator_->set_step_delay(cricket::kMinimumStepDelay); |
354 } | 355 } |
355 | 356 |
356 void AddInterface(const SocketAddress& addr) { | 357 void AddInterface(const SocketAddress& addr) { |
357 network_manager_.AddInterface(addr); | 358 network_manager_.AddInterface(addr); |
358 } | 359 } |
359 | 360 |
360 void Init( | 361 void Init( |
361 rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store, | 362 rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store, |
363 const rtc::scoped_refptr<webrtc::DtlsCertificate>& certificate, | |
362 const PeerConnectionInterface::RTCConfiguration& rtc_configuration) { | 364 const PeerConnectionInterface::RTCConfiguration& rtc_configuration) { |
363 ASSERT_TRUE(session_.get() == NULL); | 365 ASSERT_TRUE(session_.get() == NULL); |
364 session_.reset(new WebRtcSessionForTest( | 366 session_.reset(new WebRtcSessionForTest( |
365 channel_manager_.get(), rtc::Thread::Current(), | 367 channel_manager_.get(), rtc::Thread::Current(), |
366 rtc::Thread::Current(), allocator_.get(), | 368 rtc::Thread::Current(), allocator_.get(), |
367 &observer_, | 369 &observer_, |
368 &mediastream_signaling_)); | 370 &mediastream_signaling_)); |
369 | 371 |
370 EXPECT_EQ(PeerConnectionInterface::kIceConnectionNew, | 372 EXPECT_EQ(PeerConnectionInterface::kIceConnectionNew, |
371 observer_.ice_connection_state_); | 373 observer_.ice_connection_state_); |
372 EXPECT_EQ(PeerConnectionInterface::kIceGatheringNew, | 374 EXPECT_EQ(PeerConnectionInterface::kIceGatheringNew, |
373 observer_.ice_gathering_state_); | 375 observer_.ice_gathering_state_); |
374 | 376 |
375 EXPECT_TRUE(session_->Initialize( | 377 if (!certificate) { |
376 options_, constraints_.get(), dtls_identity_store.Pass(), | 378 EXPECT_TRUE(session_->Initialize(options_, constraints_.get(), |
377 rtc_configuration)); | 379 dtls_identity_store.Pass(), |
380 rtc_configuration)); | |
381 } else { | |
382 EXPECT_TRUE(session_->Initialize(options_, constraints_.get(), | |
383 certificate, rtc_configuration)); | |
384 } | |
378 session_->set_metrics_observer(metrics_observer_); | 385 session_->set_metrics_observer(metrics_observer_); |
379 } | 386 } |
380 | 387 |
381 void Init() { | 388 void Init() { |
382 PeerConnectionInterface::RTCConfiguration configuration; | 389 PeerConnectionInterface::RTCConfiguration configuration; |
383 Init(nullptr, configuration); | 390 Init(nullptr, nullptr, configuration); |
384 } | 391 } |
385 | 392 |
386 void InitWithIceTransport( | 393 void InitWithIceTransport( |
387 PeerConnectionInterface::IceTransportsType ice_transport_type) { | 394 PeerConnectionInterface::IceTransportsType ice_transport_type) { |
388 PeerConnectionInterface::RTCConfiguration configuration; | 395 PeerConnectionInterface::RTCConfiguration configuration; |
389 configuration.type = ice_transport_type; | 396 configuration.type = ice_transport_type; |
390 Init(nullptr, configuration); | 397 Init(nullptr, nullptr, configuration); |
391 } | 398 } |
392 | 399 |
393 void InitWithBundlePolicy( | 400 void InitWithBundlePolicy( |
394 PeerConnectionInterface::BundlePolicy bundle_policy) { | 401 PeerConnectionInterface::BundlePolicy bundle_policy) { |
395 PeerConnectionInterface::RTCConfiguration configuration; | 402 PeerConnectionInterface::RTCConfiguration configuration; |
396 configuration.bundle_policy = bundle_policy; | 403 configuration.bundle_policy = bundle_policy; |
397 Init(nullptr, configuration); | 404 Init(nullptr, nullptr, configuration); |
398 } | 405 } |
399 | 406 |
400 void InitWithRtcpMuxPolicy( | 407 void InitWithRtcpMuxPolicy( |
401 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy) { | 408 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy) { |
402 PeerConnectionInterface::RTCConfiguration configuration; | 409 PeerConnectionInterface::RTCConfiguration configuration; |
403 configuration.rtcp_mux_policy = rtcp_mux_policy; | 410 configuration.rtcp_mux_policy = rtcp_mux_policy; |
404 Init(nullptr, configuration); | 411 Init(nullptr, nullptr, configuration); |
405 } | 412 } |
406 | 413 |
407 void InitWithDtls(bool identity_request_should_fail = false) { | 414 void InitWithDtls(bool identity_request_should_fail = false) { |
408 rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store( | 415 rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store( |
409 new FakeDtlsIdentityStore()); | 416 new FakeDtlsIdentityStore()); |
410 dtls_identity_store->set_should_fail(identity_request_should_fail); | 417 dtls_identity_store->set_should_fail(identity_request_should_fail); |
411 PeerConnectionInterface::RTCConfiguration configuration; | 418 PeerConnectionInterface::RTCConfiguration configuration; |
412 Init(dtls_identity_store.Pass(), configuration); | 419 Init(dtls_identity_store.Pass(), nullptr, configuration); |
413 } | 420 } |
414 | 421 |
415 void InitWithDtmfCodec() { | 422 void InitWithDtmfCodec() { |
416 // Add kTelephoneEventCodec for dtmf test. | 423 // Add kTelephoneEventCodec for dtmf test. |
417 const cricket::AudioCodec kTelephoneEventCodec( | 424 const cricket::AudioCodec kTelephoneEventCodec( |
418 106, "telephone-event", 8000, 0, 1, 0); | 425 106, "telephone-event", 8000, 0, 1, 0); |
419 std::vector<cricket::AudioCodec> codecs; | 426 std::vector<cricket::AudioCodec> codecs; |
420 codecs.push_back(kTelephoneEventCodec); | 427 codecs.push_back(kTelephoneEventCodec); |
421 media_engine_->SetAudioCodecs(codecs); | 428 media_engine_->SetAudioCodecs(codecs); |
422 desc_factory_->set_audio_codecs(codecs); | 429 desc_factory_->set_audio_codecs(codecs); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
533 EXPECT_EQ(std::string(cricket::kMediaProtocolAvpf), | 540 EXPECT_EQ(std::string(cricket::kMediaProtocolAvpf), |
534 video_content->protocol()); | 541 video_content->protocol()); |
535 } | 542 } |
536 } | 543 } |
537 | 544 |
538 // Set the internal fake description factories to do DTLS-SRTP. | 545 // Set the internal fake description factories to do DTLS-SRTP. |
539 void SetFactoryDtlsSrtp() { | 546 void SetFactoryDtlsSrtp() { |
540 desc_factory_->set_secure(cricket::SEC_DISABLED); | 547 desc_factory_->set_secure(cricket::SEC_DISABLED); |
541 std::string identity_name = "WebRTC" + | 548 std::string identity_name = "WebRTC" + |
542 rtc::ToString(rtc::CreateRandomId()); | 549 rtc::ToString(rtc::CreateRandomId()); |
543 identity_.reset(rtc::SSLIdentity::Generate(identity_name)); | 550 certificate_ = webrtc::DtlsCertificate::Create( |
544 tdesc_factory_->set_identity(identity_.get()); | 551 rtc::scoped_ptr<rtc::SSLIdentity>( |
552 rtc::SSLIdentity::Generate(identity_name)).Pass()); | |
553 tdesc_factory_->set_certificate(certificate_); | |
545 tdesc_factory_->set_secure(cricket::SEC_REQUIRED); | 554 tdesc_factory_->set_secure(cricket::SEC_REQUIRED); |
546 } | 555 } |
547 | 556 |
548 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp, | 557 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp, |
549 bool expected) { | 558 bool expected) { |
550 const TransportInfo* audio = sdp->GetTransportInfoByName("audio"); | 559 const TransportInfo* audio = sdp->GetTransportInfoByName("audio"); |
551 ASSERT_TRUE(audio != NULL); | 560 ASSERT_TRUE(audio != NULL); |
552 ASSERT_EQ(expected, audio->description.identity_fingerprint.get() != NULL); | 561 ASSERT_EQ(expected, audio->description.identity_fingerprint.get() != NULL); |
553 const TransportInfo* video = sdp->GetTransportInfoByName("video"); | 562 const TransportInfo* video = sdp->GetTransportInfoByName("video"); |
554 ASSERT_TRUE(video != NULL); | 563 ASSERT_TRUE(video != NULL); |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1232 allocator_->set_step_delay(cricket::kMinimumStepDelay); | 1241 allocator_->set_step_delay(cricket::kMinimumStepDelay); |
1233 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | | 1242 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | |
1234 cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG); | 1243 cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG); |
1235 } | 1244 } |
1236 | 1245 |
1237 cricket::FakeMediaEngine* media_engine_; | 1246 cricket::FakeMediaEngine* media_engine_; |
1238 cricket::FakeDataEngine* data_engine_; | 1247 cricket::FakeDataEngine* data_engine_; |
1239 cricket::FakeDeviceManager* device_manager_; | 1248 cricket::FakeDeviceManager* device_manager_; |
1240 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; | 1249 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; |
1241 rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_; | 1250 rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_; |
1242 rtc::scoped_ptr<rtc::SSLIdentity> identity_; | 1251 rtc::scoped_refptr<webrtc::DtlsCertificate> certificate_; |
1243 rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_; | 1252 rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_; |
1244 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; | 1253 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; |
1245 rtc::scoped_ptr<rtc::VirtualSocketServer> vss_; | 1254 rtc::scoped_ptr<rtc::VirtualSocketServer> vss_; |
1246 rtc::scoped_ptr<rtc::FirewallSocketServer> fss_; | 1255 rtc::scoped_ptr<rtc::FirewallSocketServer> fss_; |
1247 rtc::SocketServerScope ss_scope_; | 1256 rtc::SocketServerScope ss_scope_; |
1248 rtc::SocketAddress stun_socket_addr_; | 1257 rtc::SocketAddress stun_socket_addr_; |
1249 rtc::scoped_ptr<cricket::TestStunServer> stun_server_; | 1258 rtc::scoped_ptr<cricket::TestStunServer> stun_server_; |
1250 cricket::TestTurnServer turn_server_; | 1259 cricket::TestTurnServer turn_server_; |
1251 rtc::FakeNetworkManager network_manager_; | 1260 rtc::FakeNetworkManager network_manager_; |
1252 rtc::scoped_ptr<cricket::BasicPortAllocator> allocator_; | 1261 rtc::scoped_ptr<cricket::BasicPortAllocator> allocator_; |
(...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3587 | 3596 |
3588 ASSERT_EQ(1UL, ch->recv_codecs().size()); | 3597 ASSERT_EQ(1UL, ch->recv_codecs().size()); |
3589 EXPECT_EQ(cricket::kGoogleSctpDataCodecId, ch->recv_codecs()[0].id); | 3598 EXPECT_EQ(cricket::kGoogleSctpDataCodecId, ch->recv_codecs()[0].id); |
3590 EXPECT_EQ(0, strcmp(cricket::kGoogleSctpDataCodecName, | 3599 EXPECT_EQ(0, strcmp(cricket::kGoogleSctpDataCodecName, |
3591 ch->recv_codecs()[0].name.c_str())); | 3600 ch->recv_codecs()[0].name.c_str())); |
3592 EXPECT_TRUE(ch->recv_codecs()[0].GetParam(cricket::kCodecParamPort, | 3601 EXPECT_TRUE(ch->recv_codecs()[0].GetParam(cricket::kCodecParamPort, |
3593 &portnum)); | 3602 &portnum)); |
3594 EXPECT_EQ(new_recv_port, portnum); | 3603 EXPECT_EQ(new_recv_port, portnum); |
3595 } | 3604 } |
3596 | 3605 |
3606 // Verifies that if a certificate is provided it is the one that will be used. | |
Henrik Grunell WebRTC
2015/08/12 14:46:30
I think we should run all test with parameters, on
hbos
2015/08/14 14:09:39
Hmm, will think about and address in the next PS..
| |
3607 TEST_F(WebRtcSessionTest, TestUsesProvidedCertificate) { | |
3608 rtc::scoped_refptr<webrtc::DtlsCertificate> certificate = | |
3609 FakeDtlsIdentityStore::GenerateCertificate(); | |
3610 | |
3611 PeerConnectionInterface::RTCConfiguration configuration; | |
3612 Init(nullptr, certificate, configuration); | |
3613 EXPECT_TRUE_WAIT(!session_->waiting_for_certificate(), 1000); | |
3614 | |
3615 EXPECT_EQ(session_->get_certificate(), certificate); | |
3616 } | |
3617 | |
3597 // Verifies that CreateOffer succeeds when CreateOffer is called before async | 3618 // Verifies that CreateOffer succeeds when CreateOffer is called before async |
3598 // identity generation is finished. | 3619 // identity generation is finished. |
3599 TEST_F(WebRtcSessionTest, TestCreateOfferBeforeIdentityRequestReturnSuccess) { | 3620 TEST_F(WebRtcSessionTest, TestCreateOfferBeforeIdentityRequestReturnSuccess) { |
3600 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); | 3621 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); |
3601 InitWithDtls(); | 3622 InitWithDtls(); |
3602 | 3623 |
3603 EXPECT_TRUE(session_->waiting_for_identity()); | 3624 EXPECT_TRUE(session_->waiting_for_certificate()); |
3604 mediastream_signaling_.SendAudioVideoStream1(); | 3625 mediastream_signaling_.SendAudioVideoStream1(); |
3605 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer()); | 3626 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer()); |
3606 | 3627 |
3607 EXPECT_TRUE(offer != NULL); | 3628 EXPECT_TRUE(offer != NULL); |
3608 VerifyNoCryptoParams(offer->description(), true); | 3629 VerifyNoCryptoParams(offer->description(), true); |
3609 VerifyFingerprintStatus(offer->description(), true); | 3630 VerifyFingerprintStatus(offer->description(), true); |
3610 } | 3631 } |
3611 | 3632 |
3612 // Verifies that CreateAnswer succeeds when CreateOffer is called before async | 3633 // Verifies that CreateAnswer succeeds when CreateOffer is called before async |
3613 // identity generation is finished. | 3634 // identity generation is finished. |
(...skipping 14 matching lines...) Expand all Loading... | |
3628 VerifyNoCryptoParams(answer->description(), true); | 3649 VerifyNoCryptoParams(answer->description(), true); |
3629 VerifyFingerprintStatus(answer->description(), true); | 3650 VerifyFingerprintStatus(answer->description(), true); |
3630 } | 3651 } |
3631 | 3652 |
3632 // Verifies that CreateOffer succeeds when CreateOffer is called after async | 3653 // Verifies that CreateOffer succeeds when CreateOffer is called after async |
3633 // identity generation is finished. | 3654 // identity generation is finished. |
3634 TEST_F(WebRtcSessionTest, TestCreateOfferAfterIdentityRequestReturnSuccess) { | 3655 TEST_F(WebRtcSessionTest, TestCreateOfferAfterIdentityRequestReturnSuccess) { |
3635 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); | 3656 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); |
3636 InitWithDtls(); | 3657 InitWithDtls(); |
3637 | 3658 |
3638 EXPECT_TRUE_WAIT(!session_->waiting_for_identity(), 1000); | 3659 EXPECT_TRUE_WAIT(!session_->waiting_for_certificate(), 1000); |
3639 | 3660 |
3640 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer()); | 3661 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer()); |
3641 EXPECT_TRUE(offer != NULL); | 3662 EXPECT_TRUE(offer != NULL); |
3642 } | 3663 } |
3643 | 3664 |
3644 // Verifies that CreateOffer fails when CreateOffer is called after async | 3665 // Verifies that CreateOffer fails when CreateOffer is called after async |
3645 // identity generation fails. | 3666 // identity generation fails. |
3646 TEST_F(WebRtcSessionTest, TestCreateOfferAfterIdentityRequestReturnFailure) { | 3667 TEST_F(WebRtcSessionTest, TestCreateOfferAfterIdentityRequestReturnFailure) { |
3647 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); | 3668 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); |
3648 InitWithDtls(true); | 3669 InitWithDtls(true); |
3649 | 3670 |
3650 EXPECT_TRUE_WAIT(!session_->waiting_for_identity(), 1000); | 3671 EXPECT_TRUE_WAIT(!session_->waiting_for_certificate(), 1000); |
3651 | 3672 |
3652 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer()); | 3673 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer()); |
3653 EXPECT_TRUE(offer == NULL); | 3674 EXPECT_TRUE(offer == NULL); |
3654 } | 3675 } |
3655 | 3676 |
3656 // Verifies that CreateOffer succeeds when Multiple CreateOffer calls are made | 3677 // Verifies that CreateOffer succeeds when Multiple CreateOffer calls are made |
3657 // before async identity generation is finished. | 3678 // before async identity generation is finished. |
3658 TEST_F(WebRtcSessionTest, | 3679 TEST_F(WebRtcSessionTest, |
3659 TestMultipleCreateOfferBeforeIdentityRequestReturnSuccess) { | 3680 TestMultipleCreateOfferBeforeIdentityRequestReturnSuccess) { |
3660 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); | 3681 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3943 // terminated. The offer creation may or may not have succeeded, but we | 3964 // terminated. The offer creation may or may not have succeeded, but we |
3944 // must have received a notification which, so the only invalid state | 3965 // must have received a notification which, so the only invalid state |
3945 // is kInit. | 3966 // is kInit. |
3946 EXPECT_NE(WebRtcSessionCreateSDPObserverForTest::kInit, o->state()); | 3967 EXPECT_NE(WebRtcSessionCreateSDPObserverForTest::kInit, o->state()); |
3947 } | 3968 } |
3948 } | 3969 } |
3949 | 3970 |
3950 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 3971 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
3951 // currently fails because upon disconnection and reconnection OnIceComplete is | 3972 // currently fails because upon disconnection and reconnection OnIceComplete is |
3952 // called more than once without returning to IceGatheringGathering. | 3973 // called more than once without returning to IceGatheringGathering. |
OLD | NEW |