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

Side by Side Diff: webrtc/p2p/base/p2ptransportchannel_unittest.cc

Issue 2670053002: Allow applications to limit the ICE check rate through RTCConfiguration (Closed)
Patch Set: CR feedback 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/p2p/base/p2ptransportchannel.cc ('k') | webrtc/p2p/base/port.h » ('j') | 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 2009 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2009 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 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 ConfigureEndpoints(OPEN, OPEN, kOnlyLocalPorts, kOnlyLocalPorts); 1210 ConfigureEndpoints(OPEN, OPEN, kOnlyLocalPorts, kOnlyLocalPorts);
1211 1211
1212 CreateChannels(); 1212 CreateChannels();
1213 EXPECT_TRUE_SIMULATED_WAIT(ep1_ch1()->receiving() && ep1_ch1()->writable() && 1213 EXPECT_TRUE_SIMULATED_WAIT(ep1_ch1()->receiving() && ep1_ch1()->writable() &&
1214 ep2_ch1()->receiving() && 1214 ep2_ch1()->receiving() &&
1215 ep2_ch1()->writable(), 1215 ep2_ch1()->writable(),
1216 kDefaultTimeout, clock); 1216 kDefaultTimeout, clock);
1217 1217
1218 // Drop all packets so that both channels become not writable. 1218 // Drop all packets so that both channels become not writable.
1219 fw()->AddRule(false, rtc::FP_ANY, rtc::FD_ANY, kPublicAddrs[0]); 1219 fw()->AddRule(false, rtc::FP_ANY, rtc::FD_ANY, kPublicAddrs[0]);
1220 const int kWriteTimeoutDelay = 6000; 1220 const int kWriteTimeoutDelay = 8000;
1221 EXPECT_TRUE_SIMULATED_WAIT(!ep1_ch1()->writable() && !ep2_ch1()->writable(), 1221 EXPECT_TRUE_SIMULATED_WAIT(!ep1_ch1()->writable() && !ep2_ch1()->writable(),
1222 kWriteTimeoutDelay, clock); 1222 kWriteTimeoutDelay, clock);
1223 1223
1224 ep1_ch1()->SetIceParameters(kIceParams[2]); 1224 ep1_ch1()->SetIceParameters(kIceParams[2]);
1225 ep1_ch1()->SetRemoteIceParameters(kIceParams[3]); 1225 ep1_ch1()->SetRemoteIceParameters(kIceParams[3]);
1226 ep1_ch1()->MaybeStartGathering(); 1226 ep1_ch1()->MaybeStartGathering();
1227 EXPECT_EQ(1, GetMetricsObserver(0)->GetEnumCounter( 1227 EXPECT_EQ(1, GetMetricsObserver(0)->GetEnumCounter(
1228 webrtc::kEnumCounterIceRestart, 1228 webrtc::kEnumCounterIceRestart,
1229 static_cast<int>(IceRestartState::DISCONNECTED))); 1229 static_cast<int>(IceRestartState::DISCONNECTED)));
1230 1230
(...skipping 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after
4388 4388
4389 // TCP Relay/Relay is the next. 4389 // TCP Relay/Relay is the next.
4390 VerifyNextPingableConnection(RELAY_PORT_TYPE, RELAY_PORT_TYPE, 4390 VerifyNextPingableConnection(RELAY_PORT_TYPE, RELAY_PORT_TYPE,
4391 TCP_PROTOCOL_NAME); 4391 TCP_PROTOCOL_NAME);
4392 4392
4393 // Finally, Local/Relay will be pinged. 4393 // Finally, Local/Relay will be pinged.
4394 VerifyNextPingableConnection(LOCAL_PORT_TYPE, RELAY_PORT_TYPE); 4394 VerifyNextPingableConnection(LOCAL_PORT_TYPE, RELAY_PORT_TYPE);
4395 } 4395 }
4396 4396
4397 } // namespace cricket { 4397 } // namespace cricket {
OLDNEW
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel.cc ('k') | webrtc/p2p/base/port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698