Allow changing the minimal ICE ping timeout with PeerConnection.SetConfiguration.

The original CL (https://codereview.webrtc.org/2670053002) only allows it to be set at PeerConnection creation time.

BUG=webrtc:7082

Review-Url: https://codereview.webrtc.org/2677503004
Cr-Commit-Position: refs/heads/master@{#16436}
This commit is contained in:
skvlad
2017-02-03 16:54:05 -08:00
committed by Commit bot
parent 98c437458a
commit d1f5fdac5c
2 changed files with 21 additions and 0 deletions

View File

@ -2221,6 +2221,20 @@ TEST_F(PeerConnectionInterfaceTest, SetConfigurationChangesPruneTurnPortsFlag) {
EXPECT_TRUE(port_allocator_->prune_turn_ports());
}
// Test that the ice check interval can be changed. This does not verify that
// the setting makes it all the way to P2PTransportChannel, as that would
// require a very complex set of mocks.
TEST_F(PeerConnectionInterfaceTest, SetConfigurationChangesIceCheckInterval) {
PeerConnectionInterface::RTCConfiguration config;
config.ice_check_min_interval = rtc::Optional<int>();
CreatePeerConnection(config, nullptr);
config.ice_check_min_interval = rtc::Optional<int>(100);
EXPECT_TRUE(pc_->SetConfiguration(config));
PeerConnectionInterface::RTCConfiguration new_config =
pc_->GetConfiguration();
EXPECT_EQ(new_config.ice_check_min_interval, rtc::Optional<int>(100));
}
// Test that when SetConfiguration changes both the pool size and other
// attributes, the pooled session is created with the updated attributes.
TEST_F(PeerConnectionInterfaceTest,