Add a flag to filter out high-cost networks.
This allows webrtc to not gather on cellular networks if wifi or
other low cost networks are present.
BUG=
Review-Url: https://codereview.webrtc.org/1987833002
Cr-Commit-Position: refs/heads/master@{#12979}
diff --git a/webrtc/api/peerconnectioninterface_unittest.cc b/webrtc/api/peerconnectioninterface_unittest.cc
index 0ec7478..6760a54 100644
--- a/webrtc/api/peerconnectioninterface_unittest.cc
+++ b/webrtc/api/peerconnectioninterface_unittest.cc
@@ -1050,6 +1050,8 @@
config.disable_ipv6 = true;
config.tcp_candidate_policy =
PeerConnectionInterface::kTcpCandidatePolicyDisabled;
+ config.candidate_network_policy =
+ PeerConnectionInterface::kCandidateNetworkPolicyLowCost;
config.ice_candidate_pool_size = 1;
CreatePeerConnection(config, nullptr);
@@ -1060,6 +1062,8 @@
EXPECT_EQ(1UL, session->stun_servers().size());
EXPECT_EQ(0U, session->flags() & cricket::PORTALLOCATOR_ENABLE_IPV6);
EXPECT_LT(0U, session->flags() & cricket::PORTALLOCATOR_DISABLE_TCP);
+ EXPECT_LT(0U,
+ session->flags() & cricket::PORTALLOCATOR_DISABLE_COSTLY_NETWORKS);
}
TEST_F(PeerConnectionInterfaceTest, AddStreams) {