Index: webrtc/p2p/base/p2ptransportchannel_unittest.cc |
diff --git a/webrtc/p2p/base/p2ptransportchannel_unittest.cc b/webrtc/p2p/base/p2ptransportchannel_unittest.cc |
index 3ba2558809e91b705f46e7c17212089663e194d7..eaa41a5d2e042068f493de5e6ff41031805b588b 100644 |
--- a/webrtc/p2p/base/p2ptransportchannel_unittest.cc |
+++ b/webrtc/p2p/base/p2ptransportchannel_unittest.cc |
@@ -2270,9 +2270,10 @@ |
TEST_F(P2PTransportChannelMultihomedTest, TestFailoverControlledSide) { |
rtc::ScopedFakeClock clock; |
AddAddress(0, kPublicAddrs[0]); |
- // Simulate failing over from Wi-Fi to cell interface. |
- AddAddress(1, kPublicAddrs[1], "eth0", rtc::ADAPTER_TYPE_WIFI); |
- AddAddress(1, kAlternateAddrs[1], "wlan0", rtc::ADAPTER_TYPE_CELLULAR); |
+ // Adding alternate address will make sure |kPublicAddrs| has the higher |
+ // priority than others. This is due to FakeNetwork::AddInterface method. |
+ AddAddress(1, kAlternateAddrs[1]); |
+ AddAddress(1, kPublicAddrs[1]); |
// Use only local ports for simplicity. |
SetAllocatorFlags(0, kOnlyLocalPorts); |
@@ -2321,9 +2322,10 @@ |
// The controlling side has two interfaces and one will die. |
TEST_F(P2PTransportChannelMultihomedTest, TestFailoverControllingSide) { |
rtc::ScopedFakeClock clock; |
- // Simulate failing over from Wi-Fi to cell interface. |
- AddAddress(0, kPublicAddrs[0], "eth0", rtc::ADAPTER_TYPE_WIFI); |
- AddAddress(0, kAlternateAddrs[0], "wlan0", rtc::ADAPTER_TYPE_CELLULAR); |
+ // Adding alternate address will make sure |kPublicAddrs| has the higher |
+ // priority than others. This is due to FakeNetwork::AddInterface method. |
+ AddAddress(0, kAlternateAddrs[0]); |
+ AddAddress(0, kPublicAddrs[0]); |
AddAddress(1, kPublicAddrs[1]); |
// Use only local ports for simplicity. |
@@ -2467,9 +2469,10 @@ |
// increase. |
TEST_F(P2PTransportChannelMultihomedTest, TestIceRenomination) { |
rtc::ScopedFakeClock clock; |
- // Simulate failing over from Wi-Fi to cell interface. |
- AddAddress(0, kPublicAddrs[0], "eth0", rtc::ADAPTER_TYPE_WIFI); |
- AddAddress(0, kAlternateAddrs[0], "wlan0", rtc::ADAPTER_TYPE_CELLULAR); |
+ // Adding alternate address will make sure |kPublicAddrs| has the higher |
+ // priority than others. This is due to FakeNetwork::AddInterface method. |
+ AddAddress(0, kAlternateAddrs[0]); |
+ AddAddress(0, kPublicAddrs[0]); |
AddAddress(1, kPublicAddrs[1]); |
// Use only local ports for simplicity. |
@@ -2527,9 +2530,10 @@ |
TestConnectionSwitchDampeningControlledSide) { |
rtc::ScopedFakeClock clock; |
AddAddress(0, kPublicAddrs[0]); |
- // Simulate failing over from Wi-Fi to cell interface. |
- AddAddress(1, kPublicAddrs[1], "eth0", rtc::ADAPTER_TYPE_WIFI); |
- AddAddress(1, kAlternateAddrs[1], "wlan0", rtc::ADAPTER_TYPE_CELLULAR); |
+ // Adding alternate address will make sure |kPublicAddrs| has the higher |
+ // priority than others. This is due to FakeNetwork::AddInterface method. |
+ AddAddress(1, kAlternateAddrs[1]); |
+ AddAddress(1, kPublicAddrs[1]); |
// Use only local ports for simplicity. |
SetAllocatorFlags(0, kOnlyLocalPorts); |
@@ -2585,9 +2589,10 @@ |
TEST_F(P2PTransportChannelMultihomedTest, |
TestConnectionSwitchDampeningControllingSide) { |
rtc::ScopedFakeClock clock; |
- // Simulate failing over from Wi-Fi to cell interface. |
- AddAddress(0, kPublicAddrs[0], "eth0", rtc::ADAPTER_TYPE_WIFI); |
- AddAddress(0, kAlternateAddrs[0], "wlan0", rtc::ADAPTER_TYPE_CELLULAR); |
+ // Adding alternate address will make sure |kPublicAddrs| has the higher |
+ // priority than others. This is due to FakeNetwork::AddInterface method. |
+ AddAddress(0, kAlternateAddrs[0]); |
+ AddAddress(0, kPublicAddrs[0]); |
AddAddress(1, kPublicAddrs[1]); |
// Use only local ports for simplicity. |