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

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

Issue 2597423003: RTCIceCandidatePairStats.[state/priority] added, ConnectionInfo updated. (Closed)
Patch Set: Rebase with master Created 3 years, 11 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/port.cc ('k') | webrtc/stats/rtcstats_objects.cc » ('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 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 #if defined(WEBRTC_POSIX) 10 #if defined(WEBRTC_POSIX)
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 turn_ready_, 327 turn_ready_,
328 protocol_type == PROTO_TCP ? kSimulatedRtt * 3 : kSimulatedRtt * 2, 328 protocol_type == PROTO_TCP ? kSimulatedRtt * 3 : kSimulatedRtt * 2,
329 fake_clock_); 329 fake_clock_);
330 330
331 CreateUdpPort(); 331 CreateUdpPort();
332 udp_port_->PrepareAddress(); 332 udp_port_->PrepareAddress();
333 ASSERT_TRUE_SIMULATED_WAIT(udp_ready_, kSimulatedRtt, fake_clock_); 333 ASSERT_TRUE_SIMULATED_WAIT(udp_ready_, kSimulatedRtt, fake_clock_);
334 } 334 }
335 335
336 bool CheckConnectionFailedAndPruned(Connection* conn) { 336 bool CheckConnectionFailedAndPruned(Connection* conn) {
337 return conn && !conn->active() && conn->state() == Connection::STATE_FAILED; 337 return conn && !conn->active() &&
338 conn->state() == IceCandidatePairState::FAILED;
338 } 339 }
339 340
340 // Checks that |turn_port_| has a nonempty set of connections and they are all 341 // Checks that |turn_port_| has a nonempty set of connections and they are all
341 // failed and pruned. 342 // failed and pruned.
342 bool CheckAllConnectionsFailedAndPruned() { 343 bool CheckAllConnectionsFailedAndPruned() {
343 auto& connections = turn_port_->connections(); 344 auto& connections = turn_port_->connections();
344 if (connections.empty()) { 345 if (connections.empty()) {
345 return false; 346 return false;
346 } 347 }
347 for (auto kv : connections) { 348 for (auto kv : connections) {
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 EXPECT_TRUE(turn_port_->Candidates().empty()); 1258 EXPECT_TRUE(turn_port_->Candidates().empty());
1258 turn_port_.reset(); 1259 turn_port_.reset();
1259 rtc::Thread::Current()->Post(RTC_FROM_HERE, this, MSG_TESTFINISH); 1260 rtc::Thread::Current()->Post(RTC_FROM_HERE, this, MSG_TESTFINISH);
1260 // Waiting for above message to be processed. 1261 // Waiting for above message to be processed.
1261 ASSERT_TRUE_SIMULATED_WAIT(test_finish_, 1, fake_clock_); 1262 ASSERT_TRUE_SIMULATED_WAIT(test_finish_, 1, fake_clock_);
1262 EXPECT_EQ(last_fd_count, GetFDCount()); 1263 EXPECT_EQ(last_fd_count, GetFDCount());
1263 } 1264 }
1264 #endif 1265 #endif
1265 1266
1266 } // namespace cricket 1267 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/port.cc ('k') | webrtc/stats/rtcstats_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698