Enable setting surface_ice_candidates_on_ice_transport_type_changed on the fly.

This CL enables to change surface_ice_candidates_on_ice_transport_type_changed
in RTCConfiguration via PeerConnection::SetConfiguration.

Bug: None
Change-Id: Ib7bc8a08bfc9bf59cf07fe217c6f57d0d63615f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143561
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28394}
This commit is contained in:
Qingsi Wang
2019-06-26 14:56:02 -07:00
committed by Commit Bot
parent 0ded32d5a3
commit bca1485a7a
2 changed files with 18 additions and 3 deletions

View File

@ -2465,9 +2465,22 @@ TEST_P(PeerConnectionInterfaceTest, SetConfigurationChangesIceCheckInterval) {
config = pc_->GetConfiguration();
config.ice_check_min_interval = 100;
EXPECT_TRUE(pc_->SetConfiguration(config));
PeerConnectionInterface::RTCConfiguration new_config =
pc_->GetConfiguration();
EXPECT_EQ(new_config.ice_check_min_interval, 100);
config = pc_->GetConfiguration();
EXPECT_EQ(config.ice_check_min_interval, 100);
}
TEST_P(PeerConnectionInterfaceTest,
SetConfigurationChangesSurfaceIceCandidatesOnIceTransportTypeChanged) {
PeerConnectionInterface::RTCConfiguration config;
config.surface_ice_candidates_on_ice_transport_type_changed = false;
CreatePeerConnection(config);
config = pc_->GetConfiguration();
EXPECT_FALSE(config.surface_ice_candidates_on_ice_transport_type_changed);
config.surface_ice_candidates_on_ice_transport_type_changed = true;
EXPECT_TRUE(pc_->SetConfiguration(config));
config = pc_->GetConfiguration();
EXPECT_TRUE(config.surface_ice_candidates_on_ice_transport_type_changed);
}
// Test that when SetConfiguration changes both the pool size and other