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

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

Issue 1176383004: DtlsIdentityStore[Interface/Impl] updated, DtlsIdentityService to be removed (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge w master AFTER the landing of 1268363002. "CreatePC(service,store)" using store instead of service. 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
« no previous file with comments | « talk/app/webrtc/peerconnectionfactory.cc ('k') | talk/app/webrtc/peerconnectionfactoryproxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8cf08f549b57187a0dabb2661170b994aa3b909d 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;
@@ -157,11 +158,13 @@ TEST(PeerConnectionFactoryTestInternal, CreatePCUsingInternalModules) {
NullPeerConnectionObserver observer;
webrtc::PeerConnectionInterface::IceServers servers;
+ rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store(
+ new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(
factory->CreatePeerConnection(
- servers, NULL, NULL, new FakeIdentityService(), &observer));
+ servers, nullptr, nullptr, dtls_identity_store.Pass(), &observer));
- EXPECT_TRUE(pc.get() != NULL);
+ EXPECT_TRUE(pc.get() != nullptr);
}
// This test verifies creation of PeerConnection with valid STUN and TURN
@@ -177,10 +180,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingIceServers) {
ice_server.uri = kTurnIceServerWithTransport;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
+ rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(
- factory_->CreatePeerConnection(config, NULL,
+ factory_->CreatePeerConnection(config, nullptr,
allocator_factory_.get(),
- new FakeIdentityService(),
+ dtls_identity_store.Pass(),
&observer_));
EXPECT_TRUE(pc.get() != NULL);
StunConfigurations stun_configs;
@@ -209,10 +214,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingIceServersUrls) {
ice_server.urls.push_back(kTurnIceServerWithTransport);
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
+ rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(
- factory_->CreatePeerConnection(config, NULL,
+ factory_->CreatePeerConnection(config, nullptr,
allocator_factory_.get(),
- new FakeIdentityService(),
+ dtls_identity_store.Pass(),
&observer_));
EXPECT_TRUE(pc.get() != NULL);
StunConfigurations stun_configs;
@@ -245,10 +252,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingIceServersOldSignature) {
ice_server.uri = kTurnIceServerWithTransport;
ice_server.password = kTurnPassword;
ice_servers.push_back(ice_server);
+ rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(
- factory_->CreatePeerConnection(ice_servers, NULL,
+ factory_->CreatePeerConnection(ice_servers, nullptr,
allocator_factory_.get(),
- new FakeIdentityService(),
+ dtls_identity_store.Pass(),
&observer_));
EXPECT_TRUE(pc.get() != NULL);
StunConfigurations stun_configs;
@@ -275,10 +284,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingNoUsernameInUri) {
ice_server.username = kTurnUsername;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
+ rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(
- factory_->CreatePeerConnection(config, NULL,
+ factory_->CreatePeerConnection(config, nullptr,
allocator_factory_.get(),
- new FakeIdentityService(),
+ dtls_identity_store.Pass(),
&observer_));
EXPECT_TRUE(pc.get() != NULL);
TurnConfigurations turn_configs;
@@ -296,10 +307,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingTurnUrlWithTransportParam) {
ice_server.uri = kTurnIceServerWithTransport;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
+ rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(
- factory_->CreatePeerConnection(config, NULL,
+ factory_->CreatePeerConnection(config, nullptr,
allocator_factory_.get(),
- new FakeIdentityService(),
+ dtls_identity_store.Pass(),
&observer_));
EXPECT_TRUE(pc.get() != NULL);
TurnConfigurations turn_configs;
@@ -321,10 +334,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingSecureTurnUrl) {
ice_server.uri = kSecureTurnIceServerWithoutTransportAndPortParam;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
+ rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(
- factory_->CreatePeerConnection(config, NULL,
+ factory_->CreatePeerConnection(config, nullptr,
allocator_factory_.get(),
- new FakeIdentityService(),
+ dtls_identity_store.Pass(),
&observer_));
EXPECT_TRUE(pc.get() != NULL);
TurnConfigurations turn_configs;
@@ -358,10 +373,12 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingIPLiteralAddress) {
ice_server.uri = kTurnIceServerWithIPv6Address;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
+ rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(
- factory_->CreatePeerConnection(config, NULL,
+ factory_->CreatePeerConnection(config, nullptr,
allocator_factory_.get(),
- new FakeIdentityService(),
+ dtls_identity_store.Pass(),
&observer_));
EXPECT_TRUE(pc.get() != NULL);
StunConfigurations stun_configs;
« no previous file with comments | « talk/app/webrtc/peerconnectionfactory.cc ('k') | talk/app/webrtc/peerconnectionfactoryproxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698