Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: webrtc/pc/peerconnectioninterface_unittest.cc

Issue 2677503004: Allow changing the minimal ICE ping timeout with PeerConnection.SetConfiguration. (Closed)
Patch Set: Change the assertion Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/pc/peerconnection.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2214 PeerConnectionInterface::RTCConfiguration config; 2214 PeerConnectionInterface::RTCConfiguration config;
2215 config.prune_turn_ports = false; 2215 config.prune_turn_ports = false;
2216 CreatePeerConnection(config, nullptr); 2216 CreatePeerConnection(config, nullptr);
2217 EXPECT_FALSE(port_allocator_->prune_turn_ports()); 2217 EXPECT_FALSE(port_allocator_->prune_turn_ports());
2218 2218
2219 config.prune_turn_ports = true; 2219 config.prune_turn_ports = true;
2220 EXPECT_TRUE(pc_->SetConfiguration(config)); 2220 EXPECT_TRUE(pc_->SetConfiguration(config));
2221 EXPECT_TRUE(port_allocator_->prune_turn_ports()); 2221 EXPECT_TRUE(port_allocator_->prune_turn_ports());
2222 } 2222 }
2223 2223
2224 // Test that the ice check interval can be changed. This does not verify that
2225 // the setting makes it all the way to P2PTransportChannel, as that would
2226 // require a very complex set of mocks.
2227 TEST_F(PeerConnectionInterfaceTest, SetConfigurationChangesIceCheckInterval) {
2228 PeerConnectionInterface::RTCConfiguration config;
2229 config.ice_check_min_interval = rtc::Optional<int>();
2230 CreatePeerConnection(config, nullptr);
2231 config.ice_check_min_interval = rtc::Optional<int>(100);
2232 EXPECT_TRUE(pc_->SetConfiguration(config));
2233 PeerConnectionInterface::RTCConfiguration new_config =
2234 pc_->GetConfiguration();
2235 EXPECT_EQ(new_config.ice_check_min_interval, rtc::Optional<int>(100));
2236 }
2237
2224 // Test that when SetConfiguration changes both the pool size and other 2238 // Test that when SetConfiguration changes both the pool size and other
2225 // attributes, the pooled session is created with the updated attributes. 2239 // attributes, the pooled session is created with the updated attributes.
2226 TEST_F(PeerConnectionInterfaceTest, 2240 TEST_F(PeerConnectionInterfaceTest,
2227 SetConfigurationCreatesPooledSessionCorrectly) { 2241 SetConfigurationCreatesPooledSessionCorrectly) {
2228 CreatePeerConnection(); 2242 CreatePeerConnection();
2229 PeerConnectionInterface::RTCConfiguration config; 2243 PeerConnectionInterface::RTCConfiguration config;
2230 config.ice_candidate_pool_size = 1; 2244 config.ice_candidate_pool_size = 1;
2231 PeerConnectionInterface::IceServer server; 2245 PeerConnectionInterface::IceServer server;
2232 server.uri = kStunAddressOnly; 2246 server.uri = kStunAddressOnly;
2233 config.servers.push_back(server); 2247 config.servers.push_back(server);
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
3381 EXPECT_NE(a, f); 3395 EXPECT_NE(a, f);
3382 3396
3383 PeerConnectionInterface::RTCConfiguration g; 3397 PeerConnectionInterface::RTCConfiguration g;
3384 g.disable_ipv6 = true; 3398 g.disable_ipv6 = true;
3385 EXPECT_NE(a, g); 3399 EXPECT_NE(a, g);
3386 3400
3387 PeerConnectionInterface::RTCConfiguration h( 3401 PeerConnectionInterface::RTCConfiguration h(
3388 PeerConnectionInterface::RTCConfigurationType::kAggressive); 3402 PeerConnectionInterface::RTCConfigurationType::kAggressive);
3389 EXPECT_NE(a, h); 3403 EXPECT_NE(a, h);
3390 } 3404 }
OLDNEW
« no previous file with comments | « webrtc/pc/peerconnection.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698