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

Unified Diff: webrtc/p2p/client/portallocator_unittest.cc

Issue 1378753003: WebRTC might leak srflx ip address when multiple_routes disabled and IceTransportType is relay (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 3 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/client/basicportallocator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/client/portallocator_unittest.cc
diff --git a/webrtc/p2p/client/portallocator_unittest.cc b/webrtc/p2p/client/portallocator_unittest.cc
index 92f995a3d7787550753eec544550b8fcb2371c24..b0c77d36c6832ac269166caf8a5e90409c931106 100644
--- a/webrtc/p2p/client/portallocator_unittest.cc
+++ b/webrtc/p2p/client/portallocator_unittest.cc
@@ -585,6 +585,18 @@ TEST_F(PortAllocatorTest, TestGetAllPortsNoAdapters) {
EXPECT_TRUE(candidate_allocation_done_);
}
+// Test that when enumeration is disabled, we should not have any ports when
+// candidate_filter() is set to CF_RELAY and no relay is specified.
+TEST_F(PortAllocatorTest,
+ TestDisableAdapterEnumerationWithoutNatRelayTransportOnly) {
+ AddInterfaceAsDefaultRoute(kClientAddr);
+ ResetWithStunServerNoNat(kStunAddr);
+ allocator().set_candidate_filter(cricket::CF_RELAY);
+ // Expect to see no ports and no candidates.
+ CheckDisableAdapterEnumeration(0U, rtc::IPAddress(), rtc::IPAddress(),
+ rtc::IPAddress(), rtc::IPAddress());
+}
+
// Test that we should only get STUN and TURN candidates when adapter
// enumeration is disabled.
TEST_F(PortAllocatorTest, TestDisableAdapterEnumerationBehindNat) {
« no previous file with comments | « webrtc/p2p/client/basicportallocator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698