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

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

Issue 1151943005: Ability to specify KeyType (RSA, ECDSA) for SSLIdentity generation in libjingle (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressing ASAN, LSAN issues in unittests Created 5 years, 6 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/peerconnectioninterface_unittest.cc
diff --git a/talk/app/webrtc/peerconnectioninterface_unittest.cc b/talk/app/webrtc/peerconnectioninterface_unittest.cc
index a0e882664fad98f6d1bdd4b009c0778213290889..fab8379618c57c5dd254efc2764a0e6115539434 100644
--- a/talk/app/webrtc/peerconnectioninterface_unittest.cc
+++ b/talk/app/webrtc/peerconnectioninterface_unittest.cc
@@ -32,7 +32,7 @@
#include "talk/app/webrtc/mediastreaminterface.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
#include "talk/app/webrtc/test/fakeconstraints.h"
-#include "talk/app/webrtc/test/fakedtlsidentityservice.h"
+#include "talk/app/webrtc/test/fakedtlsidentitystore.h"
#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
#include "talk/app/webrtc/test/testsdpstrings.h"
#include "talk/app/webrtc/videosource.h"
@@ -264,18 +264,18 @@ class PeerConnectionInterfaceTest : public testing::Test {
webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, false);
}
- FakeIdentityService* dtls_service = NULL;
+ dtls_identity_store_.reset(nullptr);
bool dtls;
if (FindConstraint(constraints,
webrtc::MediaConstraintsInterface::kEnableDtlsSrtp,
&dtls,
- NULL) && dtls) {
- dtls_service = new FakeIdentityService();
+ nullptr) && dtls) {
+ dtls_identity_store_.reset(new FakeDtlsIdentityStoreRSA());
}
pc_ = pc_factory_->CreatePeerConnection(servers, constraints,
port_allocator_factory_.get(),
- dtls_service,
- &observer_);
+ &observer_,
+ dtls_identity_store_.get());
ASSERT_TRUE(pc_.get() != NULL);
observer_.SetPeerConnectionInterface(pc_.get());
EXPECT_EQ(PeerConnectionInterface::kStable, observer_.state_);
@@ -561,6 +561,7 @@ class PeerConnectionInterfaceTest : public testing::Test {
scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory_;
scoped_refptr<PeerConnectionInterface> pc_;
MockPeerConnectionObserver observer_;
+ scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store_;
};
TEST_F(PeerConnectionInterfaceTest,

Powered by Google App Engine
This is Rietveld 408576698