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

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

Issue 2086793002: Set the generation on peer reflexive candidates when created. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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: webrtc/p2p/base/p2ptransportchannel_unittest.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel_unittest.cc b/webrtc/p2p/base/p2ptransportchannel_unittest.cc
index 45add0c733f03e100df0754478a406b6dc7133cd..0ff1b730501c6b42aec87a751210160c0f3fb5e8 100644
--- a/webrtc/p2p/base/p2ptransportchannel_unittest.cc
+++ b/webrtc/p2p/base/p2ptransportchannel_unittest.cc
@@ -1067,6 +1067,16 @@ TEST_F(P2PTransportChannelTest, HandleUfragPwdChange) {
DestroyChannels();
}
+// Same as above test, but with a symmetric NAT.
+// We should end up with relay<->prflx candidate pairs, with generation "1".
+TEST_F(P2PTransportChannelTest, HandleUfragPwdChangeSymmetricNat) {
+ ConfigureEndpoints(NAT_SYMMETRIC, NAT_SYMMETRIC, kDefaultPortAllocatorFlags,
+ kDefaultPortAllocatorFlags);
+ CreateChannels(1);
+ TestHandleIceUfragPasswordChanged();
+ DestroyChannels();
+}
+
// Test the operation of GetStats.
TEST_F(P2PTransportChannelTest, GetStats) {
ConfigureEndpoints(OPEN, OPEN, kDefaultPortAllocatorFlags,
@@ -1271,6 +1281,11 @@ TEST_F(P2PTransportChannelTest, TestTcpConnectionsFromActiveToPassive) {
SetAllowTcpListen(0, true); // actpass.
SetAllowTcpListen(1, false); // active.
+ // We want SetRemoteIceCredentials to be called as it normally would.
+ // Otherwise we won't know what credentials to use for the expected
+ // prflx TCP candidates.
+ set_clear_remote_candidates_ufrag_pwd(true);
Taylor Brandstetter 2016/06/21 01:53:10 A couple tests needed to be updated because they w
+
// Pause candidate so we could verify the candidate properties.
PauseCandidates(0);
PauseCandidates(1);
@@ -1558,6 +1573,7 @@ class P2PTransportChannelSameNatTest : public P2PTransportChannelTestBase {
static_cast<rtc::NATType>(nat_type - NAT_FULL_CONE));
ConfigureEndpoint(outer_nat, 0, config1);
ConfigureEndpoint(outer_nat, 1, config2);
+ set_clear_remote_candidates_ufrag_pwd(true);
}
void ConfigureEndpoint(rtc::NATSocketServer::Translator* nat,
int endpoint, Config config) {

Powered by Google App Engine
This is Rietveld 408576698