Index: talk/app/webrtc/peerconnectionfactory_unittest.cc |
diff --git a/talk/app/webrtc/peerconnectionfactory_unittest.cc b/talk/app/webrtc/peerconnectionfactory_unittest.cc |
index 80885888522fbca032dc32853cc639214b634e68..76dd0b9f63aca88b89c69cf3e2601a8c8a0dcffc 100644 |
--- a/talk/app/webrtc/peerconnectionfactory_unittest.cc |
+++ b/talk/app/webrtc/peerconnectionfactory_unittest.cc |
@@ -30,7 +30,7 @@ |
#include "talk/app/webrtc/fakeportallocatorfactory.h" |
#include "talk/app/webrtc/mediastreaminterface.h" |
#include "talk/app/webrtc/peerconnectionfactory.h" |
-#include "talk/app/webrtc/test/fakedtlsidentityservice.h" |
+#include "talk/app/webrtc/test/fakedtlsidentitystore.h" |
#include "talk/app/webrtc/test/fakevideotrackrenderer.h" |
#include "talk/app/webrtc/videosourceinterface.h" |
#include "talk/media/base/fakevideocapturer.h" |
@@ -40,8 +40,9 @@ |
#include "webrtc/base/scoped_ptr.h" |
#include "webrtc/base/thread.h" |
-using webrtc::FakeVideoTrackRenderer; |
using webrtc::DataChannelInterface; |
+using webrtc::DtlsIdentityStoreInterface; |
+using webrtc::FakeVideoTrackRenderer; |
using webrtc::MediaStreamInterface; |
using webrtc::PeerConnectionFactoryInterface; |
using webrtc::PeerConnectionInterface; |
@@ -144,6 +145,7 @@ class PeerConnectionFactoryTest : public testing::Test { |
} |
rtc::scoped_refptr<PeerConnectionFactoryInterface> factory_; |
+ rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store_; |
NullPeerConnectionObserver observer_; |
rtc::scoped_refptr<PortAllocatorFactoryInterface> allocator_factory_; |
}; |
@@ -157,9 +159,11 @@ TEST(PeerConnectionFactoryTestInternal, CreatePCUsingInternalModules) { |
NullPeerConnectionObserver observer; |
webrtc::PeerConnectionInterface::IceServers servers; |
+ rtc::scoped_ptr<FakeDtlsIdentityStoreRSA> dtls_identity_store( |
+ new FakeDtlsIdentityStoreRSA()); |
rtc::scoped_refptr<PeerConnectionInterface> pc( |
factory->CreatePeerConnection( |
- servers, NULL, NULL, new FakeIdentityService(), &observer)); |
+ servers, NULL, NULL, &observer, dtls_identity_store.get())); |
EXPECT_TRUE(pc.get() != NULL); |
} |
@@ -177,11 +181,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingIceServers) { |
ice_server.uri = kTurnIceServerWithTransport; |
ice_server.password = kTurnPassword; |
config.servers.push_back(ice_server); |
+ dtls_identity_store_.reset(new FakeDtlsIdentityStoreRSA()); |
rtc::scoped_refptr<PeerConnectionInterface> pc( |
factory_->CreatePeerConnection(config, NULL, |
allocator_factory_.get(), |
- new FakeIdentityService(), |
- &observer_)); |
+ &observer_, |
+ dtls_identity_store_.get())); |
EXPECT_TRUE(pc.get() != NULL); |
StunConfigurations stun_configs; |
webrtc::PortAllocatorFactoryInterface::StunConfiguration stun1( |
@@ -209,11 +214,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingIceServersUrls) { |
ice_server.urls.push_back(kTurnIceServerWithTransport); |
ice_server.password = kTurnPassword; |
config.servers.push_back(ice_server); |
+ dtls_identity_store_.reset(new FakeDtlsIdentityStoreRSA()); |
rtc::scoped_refptr<PeerConnectionInterface> pc( |
factory_->CreatePeerConnection(config, NULL, |
allocator_factory_.get(), |
- new FakeIdentityService(), |
- &observer_)); |
+ &observer_, |
+ dtls_identity_store_.get())); |
EXPECT_TRUE(pc.get() != NULL); |
StunConfigurations stun_configs; |
webrtc::PortAllocatorFactoryInterface::StunConfiguration stun1( |
@@ -245,11 +251,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingIceServersOldSignature) { |
ice_server.uri = kTurnIceServerWithTransport; |
ice_server.password = kTurnPassword; |
ice_servers.push_back(ice_server); |
+ dtls_identity_store_.reset(new FakeDtlsIdentityStoreRSA()); |
rtc::scoped_refptr<PeerConnectionInterface> pc( |
factory_->CreatePeerConnection(ice_servers, NULL, |
allocator_factory_.get(), |
- new FakeIdentityService(), |
- &observer_)); |
+ &observer_, |
+ dtls_identity_store_.get())); |
EXPECT_TRUE(pc.get() != NULL); |
StunConfigurations stun_configs; |
webrtc::PortAllocatorFactoryInterface::StunConfiguration stun1( |
@@ -275,11 +282,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingNoUsernameInUri) { |
ice_server.username = kTurnUsername; |
ice_server.password = kTurnPassword; |
config.servers.push_back(ice_server); |
+ dtls_identity_store_.reset(new FakeDtlsIdentityStoreRSA()); |
rtc::scoped_refptr<PeerConnectionInterface> pc( |
factory_->CreatePeerConnection(config, NULL, |
allocator_factory_.get(), |
- new FakeIdentityService(), |
- &observer_)); |
+ &observer_, |
+ dtls_identity_store_.get())); |
EXPECT_TRUE(pc.get() != NULL); |
TurnConfigurations turn_configs; |
webrtc::PortAllocatorFactoryInterface::TurnConfiguration turn( |
@@ -296,11 +304,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingTurnUrlWithTransportParam) { |
ice_server.uri = kTurnIceServerWithTransport; |
ice_server.password = kTurnPassword; |
config.servers.push_back(ice_server); |
+ dtls_identity_store_.reset(new FakeDtlsIdentityStoreRSA()); |
rtc::scoped_refptr<PeerConnectionInterface> pc( |
factory_->CreatePeerConnection(config, NULL, |
allocator_factory_.get(), |
- new FakeIdentityService(), |
- &observer_)); |
+ &observer_, |
+ dtls_identity_store_.get())); |
EXPECT_TRUE(pc.get() != NULL); |
TurnConfigurations turn_configs; |
webrtc::PortAllocatorFactoryInterface::TurnConfiguration turn( |
@@ -321,11 +330,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingSecureTurnUrl) { |
ice_server.uri = kSecureTurnIceServerWithoutTransportAndPortParam; |
ice_server.password = kTurnPassword; |
config.servers.push_back(ice_server); |
+ dtls_identity_store_.reset(new FakeDtlsIdentityStoreRSA()); |
rtc::scoped_refptr<PeerConnectionInterface> pc( |
factory_->CreatePeerConnection(config, NULL, |
allocator_factory_.get(), |
- new FakeIdentityService(), |
- &observer_)); |
+ &observer_, |
+ dtls_identity_store_.get())); |
EXPECT_TRUE(pc.get() != NULL); |
TurnConfigurations turn_configs; |
webrtc::PortAllocatorFactoryInterface::TurnConfiguration turn1( |
@@ -358,11 +368,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingIPLiteralAddress) { |
ice_server.uri = kTurnIceServerWithIPv6Address; |
ice_server.password = kTurnPassword; |
config.servers.push_back(ice_server); |
+ dtls_identity_store_.reset(new FakeDtlsIdentityStoreRSA()); |
rtc::scoped_refptr<PeerConnectionInterface> pc( |
factory_->CreatePeerConnection(config, NULL, |
allocator_factory_.get(), |
- new FakeIdentityService(), |
- &observer_)); |
+ &observer_, |
+ dtls_identity_store_.get())); |
EXPECT_TRUE(pc.get() != NULL); |
StunConfigurations stun_configs; |
webrtc::PortAllocatorFactoryInterface::StunConfiguration stun1( |