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

Side by Side Diff: webrtc/p2p/client/basicportallocator_unittest.cc

Issue 2731813002: Add the option to disable IPv6 ICE candidates on WiFi (Closed)
Patch Set: Fix the rtc_unittests Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « webrtc/p2p/client/basicportallocator.cc ('k') | webrtc/pc/peerconnection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2009 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 AddInterface(kClientAddr2, "net2", rtc::ADAPTER_TYPE_CELLULAR); 632 AddInterface(kClientAddr2, "net2", rtc::ADAPTER_TYPE_CELLULAR);
633 AddInterface(kClientIPv6Addr2, "net2", rtc::ADAPTER_TYPE_CELLULAR); 633 AddInterface(kClientIPv6Addr2, "net2", rtc::ADAPTER_TYPE_CELLULAR);
634 allocator_.reset(new BasicPortAllocator(&network_manager_)); 634 allocator_.reset(new BasicPortAllocator(&network_manager_));
635 allocator_->SetConfiguration(allocator_->stun_servers(), 635 allocator_->SetConfiguration(allocator_->stun_servers(),
636 allocator_->turn_servers(), 0, true); 636 allocator_->turn_servers(), 0, true);
637 // Have both UDP/TCP and IPv4/IPv6 TURN ports. 637 // Have both UDP/TCP and IPv4/IPv6 TURN ports.
638 AddTurnServers(kTurnUdpIntAddr, kTurnTcpIntAddr); 638 AddTurnServers(kTurnUdpIntAddr, kTurnTcpIntAddr);
639 AddTurnServers(kTurnUdpIntIPv6Addr, kTurnTcpIntIPv6Addr); 639 AddTurnServers(kTurnUdpIntIPv6Addr, kTurnTcpIntIPv6Addr);
640 640
641 allocator_->set_step_delay(kMinimumStepDelay); 641 allocator_->set_step_delay(kMinimumStepDelay);
642 allocator_->set_flags(allocator().flags() | 642 allocator_->set_flags(
643 PORTALLOCATOR_ENABLE_SHARED_SOCKET | 643 allocator().flags() | PORTALLOCATOR_ENABLE_SHARED_SOCKET |
644 PORTALLOCATOR_ENABLE_IPV6); 644 PORTALLOCATOR_ENABLE_IPV6 | PORTALLOCATOR_ENABLE_IPV6_ON_WIFI);
645 EXPECT_TRUE(CreateSession(ICE_CANDIDATE_COMPONENT_RTP)); 645 EXPECT_TRUE(CreateSession(ICE_CANDIDATE_COMPONENT_RTP));
646 session_->StartGettingPorts(); 646 session_->StartGettingPorts();
647 EXPECT_TRUE_SIMULATED_WAIT(candidate_allocation_done_, 647 EXPECT_TRUE_SIMULATED_WAIT(candidate_allocation_done_,
648 kDefaultAllocationTimeout, fake_clock); 648 kDefaultAllocationTimeout, fake_clock);
649 // 10 ports (4 STUN and 1 TURN ports on each interface) will be ready to 649 // 10 ports (4 STUN and 1 TURN ports on each interface) will be ready to
650 // use. 650 // use.
651 EXPECT_EQ(10U, session_->ReadyPorts().size()); 651 EXPECT_EQ(10U, session_->ReadyPorts().size());
652 EXPECT_EQ(10U, ports_.size()); 652 EXPECT_EQ(10U, ports_.size());
653 EXPECT_EQ(1, CountPorts(ports_, "local", PROTO_UDP, kClientAddr)); 653 EXPECT_EQ(1, CountPorts(ports_, "local", PROTO_UDP, kClientAddr));
654 EXPECT_EQ(1, CountPorts(ports_, "local", PROTO_UDP, kClientAddr2)); 654 EXPECT_EQ(1, CountPorts(ports_, "local", PROTO_UDP, kClientAddr2));
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 for (const Candidate& candidate : candidates) { 1893 for (const Candidate& candidate : candidates) {
1894 // Expect only relay candidates now that the filter is applied. 1894 // Expect only relay candidates now that the filter is applied.
1895 EXPECT_EQ(std::string(RELAY_PORT_TYPE), candidate.type()); 1895 EXPECT_EQ(std::string(RELAY_PORT_TYPE), candidate.type());
1896 // Expect that the raddr is emptied due to the CF_RELAY filter. 1896 // Expect that the raddr is emptied due to the CF_RELAY filter.
1897 EXPECT_EQ(candidate.related_address(), 1897 EXPECT_EQ(candidate.related_address(),
1898 rtc::EmptySocketAddressWithFamily(candidate.address().family())); 1898 rtc::EmptySocketAddressWithFamily(candidate.address().family()));
1899 } 1899 }
1900 } 1900 }
1901 1901
1902 } // namespace cricket 1902 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/client/basicportallocator.cc ('k') | webrtc/pc/peerconnection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698