| 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 cricket::P2PTransportChannel* channel = new cricket::P2PTransportChannel( | 310 cricket::P2PTransportChannel* channel = new cricket::P2PTransportChannel( |
| 311 "test content name", component, GetAllocator(endpoint)); | 311 "test content name", component, GetAllocator(endpoint)); |
| 312 channel->SignalCandidateGathered.connect( | 312 channel->SignalCandidateGathered.connect( |
| 313 this, &P2PTransportChannelTestBase::OnCandidateGathered); | 313 this, &P2PTransportChannelTestBase::OnCandidateGathered); |
| 314 channel->SignalCandidatesRemoved.connect( | 314 channel->SignalCandidatesRemoved.connect( |
| 315 this, &P2PTransportChannelTestBase::OnCandidatesRemoved); | 315 this, &P2PTransportChannelTestBase::OnCandidatesRemoved); |
| 316 channel->SignalReadPacket.connect( | 316 channel->SignalReadPacket.connect( |
| 317 this, &P2PTransportChannelTestBase::OnReadPacket); | 317 this, &P2PTransportChannelTestBase::OnReadPacket); |
| 318 channel->SignalRoleConflict.connect( | 318 channel->SignalRoleConflict.connect( |
| 319 this, &P2PTransportChannelTestBase::OnRoleConflict); | 319 this, &P2PTransportChannelTestBase::OnRoleConflict); |
| 320 channel->SignalSelectedConnectionChanged.connect( |
| 321 this, &P2PTransportChannelTestBase::OnSelectedConnectionChanged); |
| 320 channel->SetIceCredentials(local_ice_ufrag, local_ice_pwd); | 322 channel->SetIceCredentials(local_ice_ufrag, local_ice_pwd); |
| 321 if (clear_remote_candidates_ufrag_pwd_) { | 323 if (clear_remote_candidates_ufrag_pwd_) { |
| 322 // This only needs to be set if we're clearing them from the | 324 // This only needs to be set if we're clearing them from the |
| 323 // candidates. Some unit tests rely on this not being set. | 325 // candidates. Some unit tests rely on this not being set. |
| 324 channel->SetRemoteIceCredentials(remote_ice_ufrag, remote_ice_pwd); | 326 channel->SetRemoteIceCredentials(remote_ice_ufrag, remote_ice_pwd); |
| 325 } | 327 } |
| 326 channel->SetIceRole(GetEndpoint(endpoint)->ice_role()); | 328 channel->SetIceRole(GetEndpoint(endpoint)->ice_role()); |
| 327 channel->SetIceTiebreaker(GetEndpoint(endpoint)->GetIceTiebreaker()); | 329 channel->SetIceTiebreaker(GetEndpoint(endpoint)->GetIceTiebreaker()); |
| 328 channel->Connect(); | 330 channel->Connect(); |
| 329 channel->MaybeStartGathering(); | 331 channel->MaybeStartGathering(); |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 std::list<std::string>& packets = GetPacketList(channel); | 736 std::list<std::string>& packets = GetPacketList(channel); |
| 735 packets.push_front(std::string(data, len)); | 737 packets.push_front(std::string(data, len)); |
| 736 } | 738 } |
| 737 void OnRoleConflict(cricket::TransportChannelImpl* channel) { | 739 void OnRoleConflict(cricket::TransportChannelImpl* channel) { |
| 738 GetEndpoint(channel)->OnRoleConflict(true); | 740 GetEndpoint(channel)->OnRoleConflict(true); |
| 739 cricket::IceRole new_role = | 741 cricket::IceRole new_role = |
| 740 GetEndpoint(channel)->ice_role() == cricket::ICEROLE_CONTROLLING ? | 742 GetEndpoint(channel)->ice_role() == cricket::ICEROLE_CONTROLLING ? |
| 741 cricket::ICEROLE_CONTROLLED : cricket::ICEROLE_CONTROLLING; | 743 cricket::ICEROLE_CONTROLLED : cricket::ICEROLE_CONTROLLING; |
| 742 channel->SetIceRole(new_role); | 744 channel->SetIceRole(new_role); |
| 743 } | 745 } |
| 746 |
| 747 void OnSelectedConnectionChanged(cricket::TransportChannel* channel, |
| 748 cricket::Connection* connection) { |
| 749 ++num_selected_connection_changes_; |
| 750 } |
| 751 |
| 744 int SendData(cricket::TransportChannel* channel, | 752 int SendData(cricket::TransportChannel* channel, |
| 745 const char* data, size_t len) { | 753 const char* data, size_t len) { |
| 746 rtc::PacketOptions options; | 754 rtc::PacketOptions options; |
| 747 return channel->SendPacket(data, len, options, 0); | 755 return channel->SendPacket(data, len, options, 0); |
| 748 } | 756 } |
| 749 bool CheckDataOnChannel(cricket::TransportChannel* channel, | 757 bool CheckDataOnChannel(cricket::TransportChannel* channel, |
| 750 const char* data, int len) { | 758 const char* data, int len) { |
| 751 return GetChannelData(channel)->CheckData(data, len); | 759 return GetChannelData(channel)->CheckData(data, len); |
| 752 } | 760 } |
| 753 static const cricket::Candidate* LocalCandidate( | 761 static const cricket::Candidate* LocalCandidate( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 } | 795 } |
| 788 | 796 |
| 789 void set_clear_remote_candidates_ufrag_pwd(bool clear) { | 797 void set_clear_remote_candidates_ufrag_pwd(bool clear) { |
| 790 clear_remote_candidates_ufrag_pwd_ = clear; | 798 clear_remote_candidates_ufrag_pwd_ = clear; |
| 791 } | 799 } |
| 792 | 800 |
| 793 void set_force_relay(bool relay) { | 801 void set_force_relay(bool relay) { |
| 794 force_relay_ = relay; | 802 force_relay_ = relay; |
| 795 } | 803 } |
| 796 | 804 |
| 805 int num_selected_connection_changes() { |
| 806 return num_selected_connection_changes_; |
| 807 } |
| 808 void set_num_selected_connection_changes(int num) { |
| 809 num_selected_connection_changes_ = num; |
| 810 } |
| 811 |
| 797 private: | 812 private: |
| 798 rtc::Thread* main_; | 813 rtc::Thread* main_; |
| 799 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; | 814 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; |
| 800 rtc::scoped_ptr<rtc::VirtualSocketServer> vss_; | 815 rtc::scoped_ptr<rtc::VirtualSocketServer> vss_; |
| 801 rtc::scoped_ptr<rtc::NATSocketServer> nss_; | 816 rtc::scoped_ptr<rtc::NATSocketServer> nss_; |
| 802 rtc::scoped_ptr<rtc::FirewallSocketServer> ss_; | 817 rtc::scoped_ptr<rtc::FirewallSocketServer> ss_; |
| 803 rtc::SocketServerScope ss_scope_; | 818 rtc::SocketServerScope ss_scope_; |
| 804 rtc::scoped_ptr<cricket::TestStunServer> stun_server_; | 819 rtc::scoped_ptr<cricket::TestStunServer> stun_server_; |
| 805 cricket::TestTurnServer turn_server_; | 820 cricket::TestTurnServer turn_server_; |
| 806 cricket::TestRelayServer relay_server_; | 821 cricket::TestRelayServer relay_server_; |
| 807 rtc::SocksProxyServer socks_server1_; | 822 rtc::SocksProxyServer socks_server1_; |
| 808 rtc::SocksProxyServer socks_server2_; | 823 rtc::SocksProxyServer socks_server2_; |
| 809 Endpoint ep1_; | 824 Endpoint ep1_; |
| 810 Endpoint ep2_; | 825 Endpoint ep2_; |
| 826 int num_selected_connection_changes_ = 0; |
| 811 bool clear_remote_candidates_ufrag_pwd_; | 827 bool clear_remote_candidates_ufrag_pwd_; |
| 812 bool force_relay_; | 828 bool force_relay_; |
| 813 }; | 829 }; |
| 814 | 830 |
| 815 // The tests have only a few outcomes, which we predefine. | 831 // The tests have only a few outcomes, which we predefine. |
| 816 const P2PTransportChannelTestBase::Result P2PTransportChannelTestBase:: | 832 const P2PTransportChannelTestBase::Result P2PTransportChannelTestBase:: |
| 817 kLocalUdpToLocalUdp("local", "udp", "local", "udp", | 833 kLocalUdpToLocalUdp("local", "udp", "local", "udp", |
| 818 "local", "udp", "local", "udp", 1000); | 834 "local", "udp", "local", "udp", 1000); |
| 819 const P2PTransportChannelTestBase::Result P2PTransportChannelTestBase:: | 835 const P2PTransportChannelTestBase::Result P2PTransportChannelTestBase:: |
| 820 kLocalUdpToStunUdp("local", "udp", "stun", "udp", | 836 kLocalUdpToStunUdp("local", "udp", "stun", "udp", |
| (...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 | 1587 |
| 1572 // Test that we can establish connectivity when both peers are multihomed. | 1588 // Test that we can establish connectivity when both peers are multihomed. |
| 1573 TEST_F(P2PTransportChannelMultihomedTest, DISABLED_TestBasic) { | 1589 TEST_F(P2PTransportChannelMultihomedTest, DISABLED_TestBasic) { |
| 1574 AddAddress(0, kPublicAddrs[0]); | 1590 AddAddress(0, kPublicAddrs[0]); |
| 1575 AddAddress(0, kAlternateAddrs[0]); | 1591 AddAddress(0, kAlternateAddrs[0]); |
| 1576 AddAddress(1, kPublicAddrs[1]); | 1592 AddAddress(1, kPublicAddrs[1]); |
| 1577 AddAddress(1, kAlternateAddrs[1]); | 1593 AddAddress(1, kAlternateAddrs[1]); |
| 1578 Test(kLocalUdpToLocalUdp); | 1594 Test(kLocalUdpToLocalUdp); |
| 1579 } | 1595 } |
| 1580 | 1596 |
| 1581 // Test that we can quickly switch links if an interface goes down. | 1597 // Test that we can quickly switch links if an interface goes down. This also |
| 1582 // The controlled side has two interfaces and one will die. | 1598 // tests that when the link switches, |SignalSelectedConnectionChanged| will be |
| 1599 // fired. The controlled side has two interfaces and one will die. |
| 1583 TEST_F(P2PTransportChannelMultihomedTest, TestFailoverControlledSide) { | 1600 TEST_F(P2PTransportChannelMultihomedTest, TestFailoverControlledSide) { |
| 1584 AddAddress(0, kPublicAddrs[0]); | 1601 AddAddress(0, kPublicAddrs[0]); |
| 1585 // Adding alternate address will make sure |kPublicAddrs| has the higher | 1602 // Adding alternate address will make sure |kPublicAddrs| has the higher |
| 1586 // priority than others. This is due to FakeNetwork::AddInterface method. | 1603 // priority than others. This is due to FakeNetwork::AddInterface method. |
| 1587 AddAddress(1, kAlternateAddrs[1]); | 1604 AddAddress(1, kAlternateAddrs[1]); |
| 1588 AddAddress(1, kPublicAddrs[1]); | 1605 AddAddress(1, kPublicAddrs[1]); |
| 1589 | 1606 |
| 1590 // Use only local ports for simplicity. | 1607 // Use only local ports for simplicity. |
| 1591 SetAllocatorFlags(0, kOnlyLocalPorts); | 1608 SetAllocatorFlags(0, kOnlyLocalPorts); |
| 1592 SetAllocatorFlags(1, kOnlyLocalPorts); | 1609 SetAllocatorFlags(1, kOnlyLocalPorts); |
| 1593 | 1610 |
| 1594 // Create channels and let them go writable, as usual. | 1611 // Create channels and let them go writable, as usual. |
| 1595 CreateChannels(1); | 1612 CreateChannels(1); |
| 1596 | 1613 |
| 1597 EXPECT_TRUE_WAIT_MARGIN(ep1_ch1()->receiving() && ep1_ch1()->writable() && | 1614 EXPECT_TRUE_WAIT_MARGIN(ep1_ch1()->receiving() && ep1_ch1()->writable() && |
| 1598 ep2_ch1()->receiving() && ep2_ch1()->writable(), | 1615 ep2_ch1()->receiving() && ep2_ch1()->writable(), |
| 1599 1000, 1000); | 1616 1000, 1000); |
| 1600 EXPECT_TRUE( | 1617 EXPECT_TRUE( |
| 1601 ep1_ch1()->best_connection() && ep2_ch1()->best_connection() && | 1618 ep1_ch1()->best_connection() && ep2_ch1()->best_connection() && |
| 1602 LocalCandidate(ep1_ch1())->address().EqualIPs(kPublicAddrs[0]) && | 1619 LocalCandidate(ep1_ch1())->address().EqualIPs(kPublicAddrs[0]) && |
| 1603 RemoteCandidate(ep1_ch1())->address().EqualIPs(kPublicAddrs[1])); | 1620 RemoteCandidate(ep1_ch1())->address().EqualIPs(kPublicAddrs[1])); |
| 1604 | 1621 |
| 1605 // Make the receiving timeout shorter for testing. | 1622 // Make the receiving timeout shorter for testing. |
| 1606 cricket::IceConfig config = CreateIceConfig(1000, false); | 1623 cricket::IceConfig config = CreateIceConfig(1000, false); |
| 1607 ep1_ch1()->SetIceConfig(config); | 1624 ep1_ch1()->SetIceConfig(config); |
| 1608 ep2_ch1()->SetIceConfig(config); | 1625 ep2_ch1()->SetIceConfig(config); |
| 1609 | 1626 |
| 1627 set_num_selected_connection_changes(0); |
| 1610 // Blackhole any traffic to or from the public addrs. | 1628 // Blackhole any traffic to or from the public addrs. |
| 1611 LOG(LS_INFO) << "Failing over..."; | 1629 LOG(LS_INFO) << "Failing over..."; |
| 1612 fw()->AddRule(false, rtc::FP_ANY, rtc::FD_ANY, kPublicAddrs[1]); | 1630 fw()->AddRule(false, rtc::FP_ANY, rtc::FD_ANY, kPublicAddrs[1]); |
| 1613 // The best connections will switch, so keep references to them. | 1631 // The best connections will switch, so keep references to them. |
| 1614 const cricket::Connection* best_connection1 = ep1_ch1()->best_connection(); | 1632 const cricket::Connection* best_connection1 = ep1_ch1()->best_connection(); |
| 1615 const cricket::Connection* best_connection2 = ep2_ch1()->best_connection(); | 1633 const cricket::Connection* best_connection2 = ep2_ch1()->best_connection(); |
| 1616 // We should detect loss of receiving within 1 second or so. | 1634 // We should detect loss of receiving within 1 second or so. |
| 1617 EXPECT_TRUE_WAIT( | 1635 EXPECT_TRUE_WAIT( |
| 1618 !best_connection1->receiving() && !best_connection2->receiving(), 3000); | 1636 !best_connection1->receiving() && !best_connection2->receiving(), 3000); |
| 1619 | 1637 |
| 1620 // We should switch over to use the alternate addr immediately on both sides | 1638 // We should switch over to use the alternate addr immediately on both sides |
| 1621 // when we are not receiving. | 1639 // when we are not receiving. |
| 1622 EXPECT_TRUE_WAIT( | 1640 EXPECT_TRUE_WAIT( |
| 1623 ep1_ch1()->best_connection()->receiving() && | 1641 ep1_ch1()->best_connection()->receiving() && |
| 1624 ep2_ch1()->best_connection()->receiving(), 1000); | 1642 ep2_ch1()->best_connection()->receiving(), 1000); |
| 1625 EXPECT_TRUE(LocalCandidate(ep1_ch1())->address().EqualIPs(kPublicAddrs[0])); | 1643 EXPECT_TRUE(LocalCandidate(ep1_ch1())->address().EqualIPs(kPublicAddrs[0])); |
| 1626 EXPECT_TRUE( | 1644 EXPECT_TRUE( |
| 1627 RemoteCandidate(ep1_ch1())->address().EqualIPs(kAlternateAddrs[1])); | 1645 RemoteCandidate(ep1_ch1())->address().EqualIPs(kAlternateAddrs[1])); |
| 1628 EXPECT_TRUE( | 1646 EXPECT_TRUE( |
| 1629 LocalCandidate(ep2_ch1())->address().EqualIPs(kAlternateAddrs[1])); | 1647 LocalCandidate(ep2_ch1())->address().EqualIPs(kAlternateAddrs[1])); |
| 1648 // It should have changed twice, one on each side. |
| 1649 EXPECT_EQ(2, num_selected_connection_changes()); |
| 1630 | 1650 |
| 1631 DestroyChannels(); | 1651 DestroyChannels(); |
| 1632 } | 1652 } |
| 1633 | 1653 |
| 1634 // Test that we can quickly switch links if an interface goes down. | 1654 // Test that we can quickly switch links if an interface goes down. This also |
| 1635 // The controlling side has two interfaces and one will die. | 1655 // tests that when the link switches, |SignalSelectedConnectionChanged| will be |
| 1656 // fired. The controlling side has two interfaces and one will die. |
| 1636 TEST_F(P2PTransportChannelMultihomedTest, TestFailoverControllingSide) { | 1657 TEST_F(P2PTransportChannelMultihomedTest, TestFailoverControllingSide) { |
| 1637 // Adding alternate address will make sure |kPublicAddrs| has the higher | 1658 // Adding alternate address will make sure |kPublicAddrs| has the higher |
| 1638 // priority than others. This is due to FakeNetwork::AddInterface method. | 1659 // priority than others. This is due to FakeNetwork::AddInterface method. |
| 1639 AddAddress(0, kAlternateAddrs[0]); | 1660 AddAddress(0, kAlternateAddrs[0]); |
| 1640 AddAddress(0, kPublicAddrs[0]); | 1661 AddAddress(0, kPublicAddrs[0]); |
| 1641 AddAddress(1, kPublicAddrs[1]); | 1662 AddAddress(1, kPublicAddrs[1]); |
| 1642 | 1663 |
| 1643 // Use only local ports for simplicity. | 1664 // Use only local ports for simplicity. |
| 1644 SetAllocatorFlags(0, kOnlyLocalPorts); | 1665 SetAllocatorFlags(0, kOnlyLocalPorts); |
| 1645 SetAllocatorFlags(1, kOnlyLocalPorts); | 1666 SetAllocatorFlags(1, kOnlyLocalPorts); |
| 1646 | 1667 |
| 1647 // Create channels and let them go writable, as usual. | 1668 // Create channels and let them go writable, as usual. |
| 1648 CreateChannels(1); | 1669 CreateChannels(1); |
| 1649 EXPECT_TRUE_WAIT_MARGIN(ep1_ch1()->receiving() && ep1_ch1()->writable() && | 1670 EXPECT_TRUE_WAIT_MARGIN(ep1_ch1()->receiving() && ep1_ch1()->writable() && |
| 1650 ep2_ch1()->receiving() && ep2_ch1()->writable(), | 1671 ep2_ch1()->receiving() && ep2_ch1()->writable(), |
| 1651 1000, 1000); | 1672 1000, 1000); |
| 1652 EXPECT_TRUE( | 1673 EXPECT_TRUE( |
| 1653 ep1_ch1()->best_connection() && ep2_ch1()->best_connection() && | 1674 ep1_ch1()->best_connection() && ep2_ch1()->best_connection() && |
| 1654 LocalCandidate(ep1_ch1())->address().EqualIPs(kPublicAddrs[0]) && | 1675 LocalCandidate(ep1_ch1())->address().EqualIPs(kPublicAddrs[0]) && |
| 1655 RemoteCandidate(ep1_ch1())->address().EqualIPs(kPublicAddrs[1])); | 1676 RemoteCandidate(ep1_ch1())->address().EqualIPs(kPublicAddrs[1])); |
| 1656 | 1677 |
| 1657 // Make the receiving timeout shorter for testing. | 1678 // Make the receiving timeout shorter for testing. |
| 1658 cricket::IceConfig config = CreateIceConfig(1000, false); | 1679 cricket::IceConfig config = CreateIceConfig(1000, false); |
| 1659 ep1_ch1()->SetIceConfig(config); | 1680 ep1_ch1()->SetIceConfig(config); |
| 1660 ep2_ch1()->SetIceConfig(config); | 1681 ep2_ch1()->SetIceConfig(config); |
| 1682 set_num_selected_connection_changes(0); |
| 1661 | 1683 |
| 1662 // Blackhole any traffic to or from the public addrs. | 1684 // Blackhole any traffic to or from the public addrs. |
| 1663 LOG(LS_INFO) << "Failing over..."; | 1685 LOG(LS_INFO) << "Failing over..."; |
| 1664 fw()->AddRule(false, rtc::FP_ANY, rtc::FD_ANY, kPublicAddrs[0]); | 1686 fw()->AddRule(false, rtc::FP_ANY, rtc::FD_ANY, kPublicAddrs[0]); |
| 1665 // The best connections will switch, so keep references to them. | 1687 // The best connections will switch, so keep references to them. |
| 1666 const cricket::Connection* best_connection1 = ep1_ch1()->best_connection(); | 1688 const cricket::Connection* best_connection1 = ep1_ch1()->best_connection(); |
| 1667 const cricket::Connection* best_connection2 = ep2_ch1()->best_connection(); | 1689 const cricket::Connection* best_connection2 = ep2_ch1()->best_connection(); |
| 1668 // We should detect loss of receiving within 1 second or so. | 1690 // We should detect loss of receiving within 1 second or so. |
| 1669 EXPECT_TRUE_WAIT( | 1691 EXPECT_TRUE_WAIT( |
| 1670 !best_connection1->receiving() && !best_connection2->receiving(), 3000); | 1692 !best_connection1->receiving() && !best_connection2->receiving(), 3000); |
| 1671 | 1693 |
| 1672 // We should switch over to use the alternate addr immediately on both sides | 1694 // We should switch over to use the alternate addr immediately on both sides |
| 1673 // when we are not receiving. | 1695 // when we are not receiving. |
| 1674 EXPECT_TRUE_WAIT( | 1696 EXPECT_TRUE_WAIT( |
| 1675 ep1_ch1()->best_connection()->receiving() && | 1697 ep1_ch1()->best_connection()->receiving() && |
| 1676 ep2_ch1()->best_connection()->receiving(), 1000); | 1698 ep2_ch1()->best_connection()->receiving(), 1000); |
| 1677 EXPECT_TRUE( | 1699 EXPECT_TRUE( |
| 1678 LocalCandidate(ep1_ch1())->address().EqualIPs(kAlternateAddrs[0])); | 1700 LocalCandidate(ep1_ch1())->address().EqualIPs(kAlternateAddrs[0])); |
| 1679 EXPECT_TRUE(RemoteCandidate(ep1_ch1())->address().EqualIPs(kPublicAddrs[1])); | 1701 EXPECT_TRUE(RemoteCandidate(ep1_ch1())->address().EqualIPs(kPublicAddrs[1])); |
| 1680 EXPECT_TRUE( | 1702 EXPECT_TRUE( |
| 1681 RemoteCandidate(ep2_ch1())->address().EqualIPs(kAlternateAddrs[0])); | 1703 RemoteCandidate(ep2_ch1())->address().EqualIPs(kAlternateAddrs[0])); |
| 1704 EXPECT_EQ(2, num_selected_connection_changes()); |
| 1682 | 1705 |
| 1683 DestroyChannels(); | 1706 DestroyChannels(); |
| 1684 } | 1707 } |
| 1685 | 1708 |
| 1686 // Tests that a Wifi-Wifi connection has the highest precedence. | 1709 // Tests that a Wifi-Wifi connection has the highest precedence. |
| 1687 TEST_F(P2PTransportChannelMultihomedTest, TestPreferWifiToWifiConnection) { | 1710 TEST_F(P2PTransportChannelMultihomedTest, TestPreferWifiToWifiConnection) { |
| 1688 // The interface names are chosen so that |cellular| would have higher | 1711 // The interface names are chosen so that |cellular| would have higher |
| 1689 // candidate priority if it is not for the network type. | 1712 // candidate priority if it is not for the network type. |
| 1690 auto& wifi = kAlternateAddrs; | 1713 auto& wifi = kAlternateAddrs; |
| 1691 auto& cellular = kPublicAddrs; | 1714 auto& cellular = kPublicAddrs; |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2721 | 2744 |
| 2722 // TCP Relay/Relay is the next. | 2745 // TCP Relay/Relay is the next. |
| 2723 VerifyNextPingableConnection(cricket::RELAY_PORT_TYPE, | 2746 VerifyNextPingableConnection(cricket::RELAY_PORT_TYPE, |
| 2724 cricket::RELAY_PORT_TYPE, | 2747 cricket::RELAY_PORT_TYPE, |
| 2725 cricket::TCP_PROTOCOL_NAME); | 2748 cricket::TCP_PROTOCOL_NAME); |
| 2726 | 2749 |
| 2727 // Finally, Local/Relay will be pinged. | 2750 // Finally, Local/Relay will be pinged. |
| 2728 VerifyNextPingableConnection(cricket::LOCAL_PORT_TYPE, | 2751 VerifyNextPingableConnection(cricket::LOCAL_PORT_TYPE, |
| 2729 cricket::RELAY_PORT_TYPE); | 2752 cricket::RELAY_PORT_TYPE); |
| 2730 } | 2753 } |
| OLD | NEW |