| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 &TurnPortTest::OnTurnPortError); | 253 &TurnPortTest::OnTurnPortError); |
| 254 turn_port_->SignalUnknownAddress.connect(this, | 254 turn_port_->SignalUnknownAddress.connect(this, |
| 255 &TurnPortTest::OnTurnUnknownAddress); | 255 &TurnPortTest::OnTurnUnknownAddress); |
| 256 turn_port_->SignalCreatePermissionResult.connect(this, | 256 turn_port_->SignalCreatePermissionResult.connect(this, |
| 257 &TurnPortTest::OnTurnCreatePermissionResult); | 257 &TurnPortTest::OnTurnCreatePermissionResult); |
| 258 } | 258 } |
| 259 void CreateUdpPort() { | 259 void CreateUdpPort() { |
| 260 udp_port_.reset(UDPPort::Create(main_, &socket_factory_, &network_, | 260 udp_port_.reset(UDPPort::Create(main_, &socket_factory_, &network_, |
| 261 kLocalAddr2.ipaddr(), 0, 0, | 261 kLocalAddr2.ipaddr(), 0, 0, |
| 262 kIceUfrag2, kIcePwd2, | 262 kIceUfrag2, kIcePwd2, |
| 263 std::string())); | 263 std::string(), false)); |
| 264 // UDP port will be controlled. | 264 // UDP port will be controlled. |
| 265 udp_port_->SetIceRole(cricket::ICEROLE_CONTROLLED); | 265 udp_port_->SetIceRole(cricket::ICEROLE_CONTROLLED); |
| 266 udp_port_->SignalPortComplete.connect( | 266 udp_port_->SignalPortComplete.connect( |
| 267 this, &TurnPortTest::OnUdpPortComplete); | 267 this, &TurnPortTest::OnUdpPortComplete); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void TestTurnAlternateServer(cricket::ProtocolType protocol_type) { | 270 void TestTurnAlternateServer(cricket::ProtocolType protocol_type) { |
| 271 std::vector<rtc::SocketAddress> redirect_addresses; | 271 std::vector<rtc::SocketAddress> redirect_addresses; |
| 272 redirect_addresses.push_back(kTurnAlternateIntAddr); | 272 redirect_addresses.push_back(kTurnAlternateIntAddr); |
| 273 | 273 |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 turn_port_->PrepareAddress(); | 807 turn_port_->PrepareAddress(); |
| 808 ASSERT_TRUE_WAIT(turn_error_, kTimeout); | 808 ASSERT_TRUE_WAIT(turn_error_, kTimeout); |
| 809 EXPECT_TRUE(turn_port_->Candidates().empty()); | 809 EXPECT_TRUE(turn_port_->Candidates().empty()); |
| 810 turn_port_.reset(); | 810 turn_port_.reset(); |
| 811 rtc::Thread::Current()->Post(this, MSG_TESTFINISH); | 811 rtc::Thread::Current()->Post(this, MSG_TESTFINISH); |
| 812 // Waiting for above message to be processed. | 812 // Waiting for above message to be processed. |
| 813 ASSERT_TRUE_WAIT(test_finish_, kTimeout); | 813 ASSERT_TRUE_WAIT(test_finish_, kTimeout); |
| 814 EXPECT_EQ(last_fd_count, GetFDCount()); | 814 EXPECT_EQ(last_fd_count, GetFDCount()); |
| 815 } | 815 } |
| 816 #endif | 816 #endif |
| OLD | NEW |