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

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: Updating unit test. 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
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel.cc ('k') | webrtc/p2p/base/port.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransportchannel_unittest.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel_unittest.cc b/webrtc/p2p/base/p2ptransportchannel_unittest.cc
index 6c26704388b8a86f50d78c079560bf568e94a83a..e5e63a3fa0c23d212a17eccb3c8dd7915c4fa49f 100644
--- a/webrtc/p2p/base/p2ptransportchannel_unittest.cc
+++ b/webrtc/p2p/base/p2ptransportchannel_unittest.cc
@@ -1071,6 +1071,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,
@@ -1333,6 +1343,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_remote_ice_credential_source(FROM_SETICECREDENTIALS);
+
// Pause candidate so we could verify the candidate properties.
PauseCandidates(0);
PauseCandidates(1);
@@ -1627,6 +1642,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_remote_ice_credential_source(FROM_SETICECREDENTIALS);
}
void ConfigureEndpoint(rtc::NATSocketServer::Translator* nat,
int endpoint, Config config) {
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel.cc ('k') | webrtc/p2p/base/port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698