OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |