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

Unified Diff: talk/app/webrtc/webrtcsession_unittest.cc

Issue 1269843005: Added DtlsCertificate, a ref counted object owning an SSLIdentity (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge with master Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: talk/app/webrtc/webrtcsession_unittest.cc
diff --git a/talk/app/webrtc/webrtcsession_unittest.cc b/talk/app/webrtc/webrtcsession_unittest.cc
index ecbd5074cd328941cc9333dddec9ac767c197e4b..f1cc626aa0861170036314f2808e6d12d0dd34f8 100644
--- a/talk/app/webrtc/webrtcsession_unittest.cc
+++ b/talk/app/webrtc/webrtcsession_unittest.cc
@@ -26,6 +26,7 @@
*/
#include "talk/app/webrtc/audiotrack.h"
+#include "talk/app/webrtc/dtlscertificate.h"
#include "talk/app/webrtc/fakemetricsobserver.h"
#include "talk/app/webrtc/jsepicecandidate.h"
#include "talk/app/webrtc/jsepsessiondescription.h"
@@ -158,6 +159,8 @@ static const char kSdpWithRtx[] =
"a=rtpmap:96 rtx/90000\r\n"
"a=fmtp:96 apt=0\r\n";
+enum DtlsCertificateGenerationMethod { PRE_GENERATED, DTLS_IDENTITY_STORE };
+
// Add some extra |newlines| to the |message| after |line|.
static void InjectAfter(const std::string& line,
const std::string& newlines,
@@ -312,7 +315,8 @@ class FakeAudioRenderer : public cricket::AudioRenderer {
cricket::AudioRenderer::Sink* sink_;
};
-class WebRtcSessionTest : public testing::Test {
+class WebRtcSessionTest
+ : public testing::TestWithParam<DtlsCertificateGenerationMethod> {
protected:
// TODO Investigate why ChannelManager crashes, if it's created
// after stun_server.
@@ -357,8 +361,14 @@ class WebRtcSessionTest : public testing::Test {
network_manager_.AddInterface(addr);
}
+ // If |certificate| != null then the certificate is used (DTLS on), otherwise
+ // |dtls_identity_store| is used (DTLS on) to try to generate a certificate.
+ // If null then DTLS is off by default, but this could be overwritten by
+ // RTCConfiguration in which case a certificate is attempted to be generated
+ // with an unspecified store.
void Init(
rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store,
+ const rtc::scoped_refptr<webrtc::DtlsCertificate>& certificate,
const PeerConnectionInterface::RTCConfiguration& rtc_configuration) {
ASSERT_TRUE(session_.get() == NULL);
session_.reset(new WebRtcSessionForTest(
@@ -372,44 +382,66 @@ class WebRtcSessionTest : public testing::Test {
EXPECT_EQ(PeerConnectionInterface::kIceGatheringNew,
observer_.ice_gathering_state_);
- EXPECT_TRUE(session_->Initialize(
- options_, constraints_.get(), dtls_identity_store.Pass(),
- rtc_configuration));
+ if (!certificate) {
+ EXPECT_TRUE(session_->Initialize(options_, constraints_.get(),
+ dtls_identity_store.Pass(),
+ rtc_configuration));
+ } else {
+ EXPECT_TRUE(session_->Initialize(options_, constraints_.get(),
+ certificate, rtc_configuration));
+ }
session_->set_metrics_observer(metrics_observer_);
}
void Init() {
PeerConnectionInterface::RTCConfiguration configuration;
- Init(nullptr, configuration);
+ Init(nullptr, nullptr, configuration);
}
void InitWithIceTransport(
PeerConnectionInterface::IceTransportsType ice_transport_type) {
PeerConnectionInterface::RTCConfiguration configuration;
configuration.type = ice_transport_type;
- Init(nullptr, configuration);
+ Init(nullptr, nullptr, configuration);
}
void InitWithBundlePolicy(
PeerConnectionInterface::BundlePolicy bundle_policy) {
PeerConnectionInterface::RTCConfiguration configuration;
configuration.bundle_policy = bundle_policy;
- Init(nullptr, configuration);
+ Init(nullptr, nullptr, configuration);
}
void InitWithRtcpMuxPolicy(
PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy) {
PeerConnectionInterface::RTCConfiguration configuration;
configuration.rtcp_mux_policy = rtcp_mux_policy;
- Init(nullptr, configuration);
+ Init(nullptr, nullptr, configuration);
+ }
+
+ void InitWithDtlsCertSuccess(
+ DtlsCertificateGenerationMethod cert_gen_method) {
+ if (cert_gen_method == PRE_GENERATED) {
+ PeerConnectionInterface::RTCConfiguration configuration;
+ Init(nullptr, FakeDtlsIdentityStore::GenerateCertificate(),
+ configuration);
+ } else if (cert_gen_method == DTLS_IDENTITY_STORE) {
+ rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store(
+ new FakeDtlsIdentityStore());
+ dtls_identity_store->set_should_fail(false);
+ PeerConnectionInterface::RTCConfiguration configuration;
+ Init(dtls_identity_store.Pass(), nullptr, configuration);
+ } else {
+ CHECK(false);
+ }
}
- void InitWithDtls(bool identity_request_should_fail = false) {
+ void InitWithDtlsCertGenFailure() {
rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store(
new FakeDtlsIdentityStore());
- dtls_identity_store->set_should_fail(identity_request_should_fail);
+ dtls_identity_store->set_should_fail(true);
PeerConnectionInterface::RTCConfiguration configuration;
- Init(dtls_identity_store.Pass(), configuration);
+ Init(dtls_identity_store.Pass(), nullptr, configuration);
}
void InitWithDtmfCodec() {
@@ -540,9 +572,10 @@ class WebRtcSessionTest : public testing::Test {
desc_factory_->set_secure(cricket::SEC_DISABLED);
std::string identity_name = "WebRTC" +
rtc::ToString(rtc::CreateRandomId());
- // Confirmed to work with KT_RSA and KT_ECDSA.
- identity_.reset(rtc::SSLIdentity::Generate(identity_name, rtc::KT_DEFAULT));
- tdesc_factory_->set_identity(identity_.get());
+ certificate_ = webrtc::DtlsCertificate::Create(
+ rtc::scoped_ptr<rtc::SSLIdentity>(
+ rtc::SSLIdentity::Generate(identity_name, rtc::KT_DEFAULT)).Pass());
+ tdesc_factory_->set_certificate(certificate_);
tdesc_factory_->set_secure(cricket::SEC_REQUIRED);
}
@@ -1186,7 +1219,10 @@ class WebRtcSessionTest : public testing::Test {
void VerifyMultipleAsyncCreateDescription(
bool success, CreateSessionDescriptionRequest::Type type) {
- InitWithDtls(!success);
+ if (success)
+ InitWithDtlsCertSuccess(DTLS_IDENTITY_STORE);
+ else
+ InitWithDtlsCertGenFailure();
SetFactoryDtlsSrtp();
if (type == CreateSessionDescriptionRequest::kAnswer) {
cricket::MediaSessionOptions options;
@@ -1240,7 +1276,7 @@ class WebRtcSessionTest : public testing::Test {
cricket::FakeDeviceManager* device_manager_;
rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_;
- rtc::scoped_ptr<rtc::SSLIdentity> identity_;
+ rtc::scoped_refptr<webrtc::DtlsCertificate> certificate_;
rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_;
rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_;
rtc::scoped_ptr<rtc::VirtualSocketServer> vss_;
@@ -1261,8 +1297,8 @@ class WebRtcSessionTest : public testing::Test {
rtc::scoped_refptr<FakeMetricsObserver> metrics_observer_;
};
-TEST_F(WebRtcSessionTest, TestInitializeWithDtls) {
- InitWithDtls();
+TEST_P(WebRtcSessionTest, TestInitializeWithDtls) {
+ InitWithDtlsCertSuccess(GetParam());
// SDES is disabled when DTLS is on.
EXPECT_EQ(cricket::SEC_DISABLED, session_->SdesPolicy());
}
@@ -1569,10 +1605,10 @@ TEST_F(WebRtcSessionTest, TestSetRemoteNonSdesAnswerWhenSdesOn) {
// Test that we accept an offer with a DTLS fingerprint when DTLS is on
// and that we return an answer with a DTLS fingerprint.
-TEST_F(WebRtcSessionTest, TestReceiveDtlsOfferCreateDtlsAnswer) {
+TEST_P(WebRtcSessionTest, TestReceiveDtlsOfferCreateDtlsAnswer) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
mediastream_signaling_.SendAudioVideoStream1();
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
SetFactoryDtlsSrtp();
cricket::MediaSessionOptions options;
options.recv_video = true;
@@ -1598,10 +1634,10 @@ TEST_F(WebRtcSessionTest, TestReceiveDtlsOfferCreateDtlsAnswer) {
// Test that we set a local offer with a DTLS fingerprint when DTLS is on
// and then we accept a remote answer with a DTLS fingerprint successfully.
-TEST_F(WebRtcSessionTest, TestCreateDtlsOfferReceiveDtlsAnswer) {
+TEST_P(WebRtcSessionTest, TestCreateDtlsOfferReceiveDtlsAnswer) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
mediastream_signaling_.SendAudioVideoStream1();
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
SetFactoryDtlsSrtp();
// Verify that we get a crypto fingerprint in the answer.
@@ -1628,9 +1664,9 @@ TEST_F(WebRtcSessionTest, TestCreateDtlsOfferReceiveDtlsAnswer) {
// Test that if we support DTLS and the other side didn't offer a fingerprint,
// we will fail to set the remote description.
-TEST_F(WebRtcSessionTest, TestReceiveNonDtlsOfferWhenDtlsOn) {
+TEST_P(WebRtcSessionTest, TestReceiveNonDtlsOfferWhenDtlsOn) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
cricket::MediaSessionOptions options;
options.recv_video = true;
options.bundle_enabled = true;
@@ -1652,9 +1688,9 @@ TEST_F(WebRtcSessionTest, TestReceiveNonDtlsOfferWhenDtlsOn) {
// Test that we return a failure when applying a local answer that doesn't have
// a DTLS fingerprint when DTLS is required.
-TEST_F(WebRtcSessionTest, TestSetLocalNonDtlsAnswerWhenDtlsOn) {
+TEST_P(WebRtcSessionTest, TestSetLocalNonDtlsAnswerWhenDtlsOn) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
SessionDescriptionInterface* offer = NULL;
SessionDescriptionInterface* answer = NULL;
CreateDtlsOfferAndNonDtlsAnswer(&offer, &answer);
@@ -1668,11 +1704,11 @@ TEST_F(WebRtcSessionTest, TestSetLocalNonDtlsAnswerWhenDtlsOn) {
// Test that we return a failure when applying a remote answer that doesn't have
// a DTLS fingerprint when DTLS is required.
-TEST_F(WebRtcSessionTest, TestSetRemoteNonDtlsAnswerWhenDtlsOn) {
+TEST_P(WebRtcSessionTest, TestSetRemoteNonDtlsAnswerWhenDtlsOn) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
// Enable both SDES and DTLS, so that offer won't be outright rejected as a
// result of using the "UDP/TLS/RTP/SAVPF" profile.
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
session_->SetSdesPolicy(cricket::SEC_ENABLED);
SessionDescriptionInterface* offer = CreateOffer();
cricket::MediaSessionOptions options;
@@ -1689,10 +1725,10 @@ TEST_F(WebRtcSessionTest, TestSetRemoteNonDtlsAnswerWhenDtlsOn) {
// Test that we create a local offer without SDES or DTLS and accept a remote
// answer without SDES or DTLS when encryption is disabled.
-TEST_F(WebRtcSessionTest, TestCreateOfferReceiveAnswerWithoutEncryption) {
+TEST_P(WebRtcSessionTest, TestCreateOfferReceiveAnswerWithoutEncryption) {
mediastream_signaling_.SendAudioVideoStream1();
options_.disable_encryption = true;
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
// Verify that we get a crypto fingerprint in the answer.
SessionDescriptionInterface* offer = CreateOffer();
@@ -1718,9 +1754,9 @@ TEST_F(WebRtcSessionTest, TestCreateOfferReceiveAnswerWithoutEncryption) {
// Test that we create a local answer without SDES or DTLS and accept a remote
// offer without SDES or DTLS when encryption is disabled.
-TEST_F(WebRtcSessionTest, TestCreateAnswerReceiveOfferWithoutEncryption) {
+TEST_P(WebRtcSessionTest, TestCreateAnswerReceiveOfferWithoutEncryption) {
options_.disable_encryption = true;
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
cricket::MediaSessionOptions options;
options.recv_video = true;
@@ -3470,7 +3506,7 @@ TEST_F(WebRtcSessionTest, TestRtpDataChannel) {
EXPECT_EQ(cricket::DCT_RTP, data_engine_->last_channel_type());
}
-TEST_F(WebRtcSessionTest, TestRtpDataChannelConstraintTakesPrecedence) {
+TEST_P(WebRtcSessionTest, TestRtpDataChannelConstraintTakesPrecedence) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
constraints_.reset(new FakeConstraints());
@@ -3478,26 +3514,26 @@ TEST_F(WebRtcSessionTest, TestRtpDataChannelConstraintTakesPrecedence) {
webrtc::MediaConstraintsInterface::kEnableRtpDataChannels, true);
options_.disable_sctp_data_channels = false;
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
SetLocalDescriptionWithDataChannel();
EXPECT_EQ(cricket::DCT_RTP, data_engine_->last_channel_type());
}
-TEST_F(WebRtcSessionTest, TestCreateOfferWithSctpEnabledWithoutStreams) {
+TEST_P(WebRtcSessionTest, TestCreateOfferWithSctpEnabledWithoutStreams) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer());
EXPECT_TRUE(offer->description()->GetContentByName("data") == NULL);
EXPECT_TRUE(offer->description()->GetTransportInfoByName("data") == NULL);
}
-TEST_F(WebRtcSessionTest, TestCreateAnswerWithSctpInOfferAndNoStreams) {
+TEST_P(WebRtcSessionTest, TestCreateAnswerWithSctpInOfferAndNoStreams) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
SetFactoryDtlsSrtp();
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
// Create remote offer with SCTP.
cricket::MediaSessionOptions options;
@@ -3513,40 +3549,40 @@ TEST_F(WebRtcSessionTest, TestCreateAnswerWithSctpInOfferAndNoStreams) {
EXPECT_TRUE(answer->description()->GetTransportInfoByName("data") != NULL);
}
-TEST_F(WebRtcSessionTest, TestSctpDataChannelWithoutDtls) {
+TEST_P(WebRtcSessionTest, TestSctpDataChannelWithoutDtls) {
constraints_.reset(new FakeConstraints());
constraints_->AddOptional(
webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, false);
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
SetLocalDescriptionWithDataChannel();
EXPECT_EQ(cricket::DCT_NONE, data_engine_->last_channel_type());
}
-TEST_F(WebRtcSessionTest, TestSctpDataChannelWithDtls) {
+TEST_P(WebRtcSessionTest, TestSctpDataChannelWithDtls) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
SetLocalDescriptionWithDataChannel();
EXPECT_EQ(cricket::DCT_SCTP, data_engine_->last_channel_type());
}
-TEST_F(WebRtcSessionTest, TestDisableSctpDataChannels) {
+TEST_P(WebRtcSessionTest, TestDisableSctpDataChannels) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
options_.disable_sctp_data_channels = true;
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
SetLocalDescriptionWithDataChannel();
EXPECT_EQ(cricket::DCT_NONE, data_engine_->last_channel_type());
}
-TEST_F(WebRtcSessionTest, TestSctpDataChannelSendPortParsing) {
+TEST_P(WebRtcSessionTest, TestSctpDataChannelSendPortParsing) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
const int new_send_port = 9998;
const int new_recv_port = 7775;
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
SetFactoryDtlsSrtp();
// By default, don't actually add the codecs to desc_factory_; they don't
@@ -3595,13 +3631,26 @@ TEST_F(WebRtcSessionTest, TestSctpDataChannelSendPortParsing) {
EXPECT_EQ(new_recv_port, portnum);
}
+// Verifies that if a certificate is provided it is the one that will be used.
+TEST_F(WebRtcSessionTest, TestUsesProvidedCertificate) {
+ rtc::scoped_refptr<webrtc::DtlsCertificate> certificate =
+ FakeDtlsIdentityStore::GenerateCertificate();
+
+ PeerConnectionInterface::RTCConfiguration configuration;
+ Init(nullptr, certificate, configuration);
+ EXPECT_TRUE_WAIT(!session_->IsWaitingForCertificate(), 1000);
+
+ EXPECT_EQ(session_->certificate(), certificate);
+}
+
// Verifies that CreateOffer succeeds when CreateOffer is called before async
-// identity generation is finished.
-TEST_F(WebRtcSessionTest, TestCreateOfferBeforeIdentityRequestReturnSuccess) {
+// identity generation is finished (even if a certificate is provided this is
+// an async op).
+TEST_P(WebRtcSessionTest, TestCreateOfferBeforeIdentityRequestReturnSuccess) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
- EXPECT_TRUE(session_->waiting_for_identity());
+ EXPECT_TRUE(session_->IsWaitingForCertificate());
mediastream_signaling_.SendAudioVideoStream1();
rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer());
@@ -3611,10 +3660,11 @@ TEST_F(WebRtcSessionTest, TestCreateOfferBeforeIdentityRequestReturnSuccess) {
}
// Verifies that CreateAnswer succeeds when CreateOffer is called before async
-// identity generation is finished.
-TEST_F(WebRtcSessionTest, TestCreateAnswerBeforeIdentityRequestReturnSuccess) {
+// identity generation is finished (even if a certificate is provided this is
+// an async op).
+TEST_P(WebRtcSessionTest, TestCreateAnswerBeforeIdentityRequestReturnSuccess) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
SetFactoryDtlsSrtp();
cricket::MediaSessionOptions options;
@@ -3631,12 +3681,13 @@ TEST_F(WebRtcSessionTest, TestCreateAnswerBeforeIdentityRequestReturnSuccess) {
}
// Verifies that CreateOffer succeeds when CreateOffer is called after async
-// identity generation is finished.
-TEST_F(WebRtcSessionTest, TestCreateOfferAfterIdentityRequestReturnSuccess) {
+// identity generation is finished (even if a certificate is provided this is
+// an async op).
+TEST_P(WebRtcSessionTest, TestCreateOfferAfterIdentityRequestReturnSuccess) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
- EXPECT_TRUE_WAIT(!session_->waiting_for_identity(), 1000);
+ EXPECT_TRUE_WAIT(!session_->IsWaitingForCertificate(), 1000);
rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer());
EXPECT_TRUE(offer != NULL);
@@ -3646,9 +3697,9 @@ TEST_F(WebRtcSessionTest, TestCreateOfferAfterIdentityRequestReturnSuccess) {
// identity generation fails.
TEST_F(WebRtcSessionTest, TestCreateOfferAfterIdentityRequestReturnFailure) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
- InitWithDtls(true);
+ InitWithDtlsCertGenFailure();
- EXPECT_TRUE_WAIT(!session_->waiting_for_identity(), 1000);
+ EXPECT_TRUE_WAIT(!session_->IsWaitingForCertificate(), 1000);
rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer());
EXPECT_TRUE(offer == NULL);
@@ -3788,9 +3839,9 @@ TEST_F(WebRtcSessionTest, TestCombinedAudioVideoBweConstraint) {
// Tests that we can renegotiate new media content with ICE candidates in the
// new remote SDP.
-TEST_F(WebRtcSessionTest, TestRenegotiateNewMediaWithCandidatesInSdp) {
+TEST_P(WebRtcSessionTest, TestRenegotiateNewMediaWithCandidatesInSdp) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
SetFactoryDtlsSrtp();
mediastream_signaling_.UseOptionsAudioOnly();
@@ -3818,9 +3869,9 @@ TEST_F(WebRtcSessionTest, TestRenegotiateNewMediaWithCandidatesInSdp) {
// Tests that we can renegotiate new media content with ICE candidates separated
// from the remote SDP.
-TEST_F(WebRtcSessionTest, TestRenegotiateNewMediaWithCandidatesSeparated) {
+TEST_P(WebRtcSessionTest, TestRenegotiateNewMediaWithCandidatesSeparated) {
MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
- InitWithDtls();
+ InitWithDtlsCertSuccess(GetParam());
SetFactoryDtlsSrtp();
mediastream_signaling_.UseOptionsAudioOnly();
@@ -3934,11 +3985,6 @@ TEST_F(WebRtcSessionTest, CreateOffersAndShutdown) {
session_.reset();
- // Make sure we process pending messages on the current (signaling) thread
- // before checking we we got our callbacks. Quit() will do this and then
- // immediately exit. We won't need the queue after this point anyway.
- rtc::Thread::Current()->Quit();
-
for (auto& o : observers) {
// We expect to have received a notification now even if the session was
// terminated. The offer creation may or may not have succeeded, but we
@@ -3951,3 +3997,7 @@ TEST_F(WebRtcSessionTest, CreateOffersAndShutdown) {
// TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
// currently fails because upon disconnection and reconnection OnIceComplete is
// called more than once without returning to IceGatheringGathering.
+
+INSTANTIATE_TEST_CASE_P(WebRtcSessionTests,
+ WebRtcSessionTest,
+ testing::Values(PRE_GENERATED, DTLS_IDENTITY_STORE));

Powered by Google App Engine
This is Rietveld 408576698