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

Unified Diff: webrtc/p2p/base/jseptransport_unittest.cc

Issue 2639203004: Revert of make the DtlsTransportWrapper inherit form DtlsTransportInternal (Closed)
Patch Set: Created 3 years, 11 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 | « webrtc/p2p/base/jseptransport.cc ('k') | webrtc/p2p/base/packettransportinterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/jseptransport_unittest.cc
diff --git a/webrtc/p2p/base/jseptransport_unittest.cc b/webrtc/p2p/base/jseptransport_unittest.cc
index 74ed35e145bec46fce8d1f237014f33141fb4377..f882a5de6d54266c3814ac0a5963d22d48292279 100644
--- a/webrtc/p2p/base/jseptransport_unittest.cc
+++ b/webrtc/p2p/base/jseptransport_unittest.cc
@@ -17,8 +17,7 @@
using cricket::JsepTransport;
using cricket::TransportChannel;
-using cricket::FakeDtlsTransport;
-using cricket::FakeIceTransport;
+using cricket::FakeTransportChannel;
using cricket::IceRole;
using cricket::TransportDescription;
using rtc::SocketAddress;
@@ -34,15 +33,15 @@
JsepTransportTest()
: transport_(new JsepTransport("test content name", nullptr)) {}
bool SetupChannel() {
- fake_ice_channel_.reset(new FakeIceTransport(transport_->mid(), 1));
- fake_dtls_transport_.reset(new FakeDtlsTransport(fake_ice_channel_.get()));
- return transport_->AddChannel(fake_dtls_transport_.get(), 1);
+ fake_ice_channel_.reset(new FakeTransportChannel(transport_->mid(), 1));
+ fake_dtls_channel_.reset(new FakeTransportChannel(transport_->mid(), 1));
+ return transport_->AddChannel(fake_dtls_channel_.get(), 1);
}
void DestroyChannel() { transport_->RemoveChannel(1); }
protected:
- std::unique_ptr<FakeDtlsTransport> fake_dtls_transport_;
- std::unique_ptr<FakeIceTransport> fake_ice_channel_;
+ std::unique_ptr<FakeTransportChannel> fake_dtls_channel_;
+ std::unique_ptr<FakeTransportChannel> fake_ice_channel_;
std::unique_ptr<JsepTransport> transport_;
};
@@ -53,16 +52,16 @@
ASSERT_TRUE(transport_->SetLocalTransportDescription(
local_desc, cricket::CA_OFFER, NULL));
EXPECT_TRUE(SetupChannel());
- EXPECT_EQ(cricket::ICEMODE_FULL, fake_dtls_transport_->remote_ice_mode());
- EXPECT_EQ(kIceUfrag1, fake_dtls_transport_->ice_ufrag());
- EXPECT_EQ(kIcePwd1, fake_dtls_transport_->ice_pwd());
+ EXPECT_EQ(cricket::ICEMODE_FULL, fake_dtls_channel_->remote_ice_mode());
+ EXPECT_EQ(kIceUfrag1, fake_dtls_channel_->ice_ufrag());
+ EXPECT_EQ(kIcePwd1, fake_dtls_channel_->ice_pwd());
cricket::TransportDescription remote_desc(kIceUfrag1, kIcePwd1);
ASSERT_TRUE(transport_->SetRemoteTransportDescription(
remote_desc, cricket::CA_ANSWER, NULL));
- EXPECT_EQ(cricket::ICEMODE_FULL, fake_dtls_transport_->remote_ice_mode());
- EXPECT_EQ(kIceUfrag1, fake_dtls_transport_->remote_ice_ufrag());
- EXPECT_EQ(kIcePwd1, fake_dtls_transport_->remote_ice_pwd());
+ EXPECT_EQ(cricket::ICEMODE_FULL, fake_dtls_channel_->remote_ice_mode());
+ EXPECT_EQ(kIceUfrag1, fake_dtls_channel_->remote_ice_ufrag());
+ EXPECT_EQ(kIcePwd1, fake_dtls_channel_->remote_ice_pwd());
}
// Verifies that IceCredentialsChanged returns true when either ufrag or pwd
@@ -113,7 +112,7 @@
EXPECT_TRUE(SetupChannel());
cricket::TransportStats stats;
EXPECT_TRUE(transport_->GetStats(&stats));
- // Note that this tests the behavior of a FakeIceTransport.
+ // Note that this tests the behavior of a FakeTransportChannel.
ASSERT_EQ(1U, stats.channel_stats.size());
EXPECT_EQ(1, stats.channel_stats[0].component);
// Set local transport description for FakeTransport before connecting.
« no previous file with comments | « webrtc/p2p/base/jseptransport.cc ('k') | webrtc/p2p/base/packettransportinterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698