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

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

Issue 1303393002: Reland "Remove GICE (gone forever!) and PORTALLOCATOR_ENABLE_SHARED_UFRAG (enabled forever)." becau… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add memcheck suppression 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 | « webrtc/p2p/base/dtlstransportchannel.h ('k') | webrtc/p2p/base/fakesession.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/dtlstransportchannel_unittest.cc
diff --git a/webrtc/p2p/base/dtlstransportchannel_unittest.cc b/webrtc/p2p/base/dtlstransportchannel_unittest.cc
index dfae0c88441066ef4f3298b65060a89598c864d2..26f6578d7b0c6e5c77775f6f085d8c19d5187173 100644
--- a/webrtc/p2p/base/dtlstransportchannel_unittest.cc
+++ b/webrtc/p2p/base/dtlstransportchannel_unittest.cc
@@ -51,7 +51,6 @@ class DtlsTestClient : public sigslot::has_slots<> {
name_(name),
signaling_thread_(signaling_thread),
worker_thread_(worker_thread),
- protocol_(cricket::ICEPROTO_GOOGLE),
packet_size_(0),
use_dtls_srtp_(false),
ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10),
@@ -59,9 +58,6 @@ class DtlsTestClient : public sigslot::has_slots<> {
received_dtls_client_hello_(false),
received_dtls_server_hello_(false) {
}
- void SetIceProtocol(cricket::TransportProtocol proto) {
- protocol_ = proto;
- }
void CreateIdentity(rtc::KeyType key_type) {
identity_.reset(rtc::SSLIdentity::Generate(name_, key_type));
}
@@ -162,10 +158,8 @@ class DtlsTestClient : public sigslot::has_slots<> {
}
}
- std::string transport_type = (protocol_ == cricket::ICEPROTO_GOOGLE) ?
- cricket::NS_GINGLE_P2P : cricket::NS_JINGLE_ICE_UDP;
cricket::TransportDescription local_desc(
- transport_type, std::vector<std::string>(), kIceUfrag1, kIcePwd1,
+ std::vector<std::string>(), kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, local_role,
// If remote if the offerer and has no DTLS support, answer will be
// without any fingerprint.
@@ -174,7 +168,7 @@ class DtlsTestClient : public sigslot::has_slots<> {
cricket::Candidates());
cricket::TransportDescription remote_desc(
- transport_type, std::vector<std::string>(), kIceUfrag1, kIcePwd1,
+ std::vector<std::string>(), kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, remote_role, remote_fingerprint.get(),
cricket::Candidates());
@@ -376,7 +370,6 @@ class DtlsTestClient : public sigslot::has_slots<> {
std::string name_;
rtc::Thread* signaling_thread_;
rtc::Thread* worker_thread_;
- cricket::TransportProtocol protocol_;
rtc::scoped_ptr<rtc::SSLIdentity> identity_;
rtc::scoped_ptr<cricket::FakeTransport> transport_;
std::vector<cricket::DtlsTransportChannelWrapper*> channels_;
@@ -549,27 +542,6 @@ class DtlsTransportChannelTest : public testing::Test {
// Test that transport negotiation of ICE, no DTLS works properly.
TEST_F(DtlsTransportChannelTest, TestChannelSetupIce) {
- client1_.SetIceProtocol(cricket::ICEPROTO_RFC5245);
- client2_.SetIceProtocol(cricket::ICEPROTO_RFC5245);
- Negotiate();
- cricket::FakeTransportChannel* channel1 = client1_.GetFakeChannel(0);
- cricket::FakeTransportChannel* channel2 = client2_.GetFakeChannel(0);
- ASSERT_TRUE(channel1 != NULL);
- ASSERT_TRUE(channel2 != NULL);
- EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel1->GetIceRole());
- EXPECT_EQ(1U, channel1->IceTiebreaker());
- EXPECT_EQ(cricket::ICEPROTO_RFC5245, channel1->protocol());
- EXPECT_EQ(kIceUfrag1, channel1->ice_ufrag());
- EXPECT_EQ(kIcePwd1, channel1->ice_pwd());
- EXPECT_EQ(cricket::ICEROLE_CONTROLLED, channel2->GetIceRole());
- EXPECT_EQ(2U, channel2->IceTiebreaker());
- EXPECT_EQ(cricket::ICEPROTO_RFC5245, channel2->protocol());
-}
-
-// Test that transport negotiation of GICE, no DTLS works properly.
-TEST_F(DtlsTransportChannelTest, TestChannelSetupGice) {
- client1_.SetIceProtocol(cricket::ICEPROTO_GOOGLE);
- client2_.SetIceProtocol(cricket::ICEPROTO_GOOGLE);
Negotiate();
cricket::FakeTransportChannel* channel1 = client1_.GetFakeChannel(0);
cricket::FakeTransportChannel* channel2 = client2_.GetFakeChannel(0);
@@ -577,12 +549,10 @@ TEST_F(DtlsTransportChannelTest, TestChannelSetupGice) {
ASSERT_TRUE(channel2 != NULL);
EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel1->GetIceRole());
EXPECT_EQ(1U, channel1->IceTiebreaker());
- EXPECT_EQ(cricket::ICEPROTO_GOOGLE, channel1->protocol());
EXPECT_EQ(kIceUfrag1, channel1->ice_ufrag());
EXPECT_EQ(kIcePwd1, channel1->ice_pwd());
EXPECT_EQ(cricket::ICEROLE_CONTROLLED, channel2->GetIceRole());
EXPECT_EQ(2U, channel2->IceTiebreaker());
- EXPECT_EQ(cricket::ICEPROTO_GOOGLE, channel2->protocol());
}
// Connect without DTLS, and transfer some data.
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.h ('k') | webrtc/p2p/base/fakesession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698