OLD | NEW |
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 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 // |candidates_|, although |ready_candidates| only includes the candidates | 1284 // |candidates_|, although |ready_candidates| only includes the candidates |
1285 // in |ready_ports|. | 1285 // in |ready_ports|. |
1286 EXPECT_LE(3U, candidates_.size()); | 1286 EXPECT_LE(3U, candidates_.size()); |
1287 const std::vector<Candidate>& ready_candidates = session_->ReadyCandidates(); | 1287 const std::vector<Candidate>& ready_candidates = session_->ReadyCandidates(); |
1288 EXPECT_EQ(3U, ready_candidates.size()); | 1288 EXPECT_EQ(3U, ready_candidates.size()); |
1289 EXPECT_PRED4(HasCandidate, ready_candidates, "local", "udp", kClientAddr); | 1289 EXPECT_PRED4(HasCandidate, ready_candidates, "local", "udp", kClientAddr); |
1290 EXPECT_PRED4(HasCandidate, ready_candidates, "relay", "udp", | 1290 EXPECT_PRED4(HasCandidate, ready_candidates, "relay", "udp", |
1291 rtc::SocketAddress(kTurnUdpExtAddr.ipaddr(), 0)); | 1291 rtc::SocketAddress(kTurnUdpExtAddr.ipaddr(), 0)); |
1292 } | 1292 } |
1293 | 1293 |
1294 // Test has an assert error on win_x64_dbg and win_dbg. See: webrtc:6068 | |
1295 #if defined(WEBRTC_WIN) | |
1296 #define MAYBE_TestEachInterfaceHasItsOwnTurnPorts \ | |
1297 DISABLED_TestEachInterfaceHasItsOwnTurnPort | |
1298 #else | |
1299 #define MAYBE_TestEachInterfaceHasItsOwnTurnPorts \ | |
1300 TestEachInterfaceHasItsOwnTurnPorts | |
1301 #endif | |
1302 // Tests that if prune_turn_ports is set, each network interface | 1294 // Tests that if prune_turn_ports is set, each network interface |
1303 // will has its own set of TurnPorts based on their priorities. | 1295 // will has its own set of TurnPorts based on their priorities. |
1304 TEST_F(BasicPortAllocatorTest, MAYBE_TestEachInterfaceHasItsOwnTurnPorts) { | 1296 TEST_F(BasicPortAllocatorTest, TestEachInterfaceHasItsOwnTurnPorts) { |
1305 turn_server_.AddInternalSocket(kTurnTcpIntAddr, PROTO_TCP); | 1297 turn_server_.AddInternalSocket(kTurnTcpIntAddr, PROTO_TCP); |
1306 turn_server_.AddInternalSocket(kTurnUdpIntIPv6Addr, PROTO_UDP); | 1298 turn_server_.AddInternalSocket(kTurnUdpIntIPv6Addr, PROTO_UDP); |
1307 turn_server_.AddInternalSocket(kTurnTcpIntIPv6Addr, PROTO_TCP); | 1299 turn_server_.AddInternalSocket(kTurnTcpIntIPv6Addr, PROTO_TCP); |
1308 // Add two interfaces both having IPv4 and IPv6 addresses. | 1300 // Add two interfaces both having IPv4 and IPv6 addresses. |
1309 AddInterface(kClientAddr, "net1", rtc::ADAPTER_TYPE_WIFI); | 1301 AddInterface(kClientAddr, "net1", rtc::ADAPTER_TYPE_WIFI); |
1310 AddInterface(kClientIPv6Addr, "net1", rtc::ADAPTER_TYPE_WIFI); | 1302 AddInterface(kClientIPv6Addr, "net1", rtc::ADAPTER_TYPE_WIFI); |
1311 AddInterface(kClientAddr2, "net2", rtc::ADAPTER_TYPE_CELLULAR); | 1303 AddInterface(kClientAddr2, "net2", rtc::ADAPTER_TYPE_CELLULAR); |
1312 AddInterface(kClientIPv6Addr2, "net2", rtc::ADAPTER_TYPE_CELLULAR); | 1304 AddInterface(kClientIPv6Addr2, "net2", rtc::ADAPTER_TYPE_CELLULAR); |
1313 allocator_.reset(new BasicPortAllocator(&network_manager_)); | 1305 allocator_.reset(new BasicPortAllocator(&network_manager_)); |
1314 allocator_->SetConfiguration(allocator_->stun_servers(), | 1306 allocator_->SetConfiguration(allocator_->stun_servers(), |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1713 for (const Candidate& candidate : candidates) { | 1705 for (const Candidate& candidate : candidates) { |
1714 // Expect only relay candidates now that the filter is applied. | 1706 // Expect only relay candidates now that the filter is applied. |
1715 EXPECT_EQ(std::string(RELAY_PORT_TYPE), candidate.type()); | 1707 EXPECT_EQ(std::string(RELAY_PORT_TYPE), candidate.type()); |
1716 // Expect that the raddr is emptied due to the CF_RELAY filter. | 1708 // Expect that the raddr is emptied due to the CF_RELAY filter. |
1717 EXPECT_EQ(candidate.related_address(), | 1709 EXPECT_EQ(candidate.related_address(), |
1718 rtc::EmptySocketAddressWithFamily(candidate.address().family())); | 1710 rtc::EmptySocketAddressWithFamily(candidate.address().family())); |
1719 } | 1711 } |
1720 } | 1712 } |
1721 | 1713 |
1722 } // namespace cricket | 1714 } // namespace cricket |
OLD | NEW |