| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 rtype == RELAY_GTURN, false, true, true); | 426 rtype == RELAY_GTURN, false, true, true); |
| 427 } | 427 } |
| 428 // helpers for above functions | 428 // helpers for above functions |
| 429 UDPPort* CreateUdpPort(const SocketAddress& addr) { | 429 UDPPort* CreateUdpPort(const SocketAddress& addr) { |
| 430 return CreateUdpPort(addr, &socket_factory_); | 430 return CreateUdpPort(addr, &socket_factory_); |
| 431 } | 431 } |
| 432 UDPPort* CreateUdpPort(const SocketAddress& addr, | 432 UDPPort* CreateUdpPort(const SocketAddress& addr, |
| 433 PacketSocketFactory* socket_factory) { | 433 PacketSocketFactory* socket_factory) { |
| 434 UDPPort* port = UDPPort::Create(main_, socket_factory, &network_, | 434 UDPPort* port = UDPPort::Create(main_, socket_factory, &network_, |
| 435 addr.ipaddr(), 0, 0, username_, password_, | 435 addr.ipaddr(), 0, 0, username_, password_, |
| 436 std::string()); | 436 std::string(), false); |
| 437 port->SetIceProtocolType(ice_protocol_); | 437 port->SetIceProtocolType(ice_protocol_); |
| 438 return port; | 438 return port; |
| 439 } | 439 } |
| 440 TCPPort* CreateTcpPort(const SocketAddress& addr) { | 440 TCPPort* CreateTcpPort(const SocketAddress& addr) { |
| 441 TCPPort* port = CreateTcpPort(addr, &socket_factory_); | 441 TCPPort* port = CreateTcpPort(addr, &socket_factory_); |
| 442 port->SetIceProtocolType(ice_protocol_); | 442 port->SetIceProtocolType(ice_protocol_); |
| 443 return port; | 443 return port; |
| 444 } | 444 } |
| 445 TCPPort* CreateTcpPort(const SocketAddress& addr, | 445 TCPPort* CreateTcpPort(const SocketAddress& addr, |
| 446 PacketSocketFactory* socket_factory) { | 446 PacketSocketFactory* socket_factory) { |
| (...skipping 2194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2641 // Set up channels and ensure both ports will be deleted. | 2641 // Set up channels and ensure both ports will be deleted. |
| 2642 TestChannel ch1(port1, port2); | 2642 TestChannel ch1(port1, port2); |
| 2643 TestChannel ch2(port2, port1); | 2643 TestChannel ch2(port2, port1); |
| 2644 | 2644 |
| 2645 // Simulate a connection that succeeds, and then is destroyed. | 2645 // Simulate a connection that succeeds, and then is destroyed. |
| 2646 StartConnectAndStopChannels(&ch1, &ch2); | 2646 StartConnectAndStopChannels(&ch1, &ch2); |
| 2647 | 2647 |
| 2648 // The controlled port should be destroyed after 10 milliseconds. | 2648 // The controlled port should be destroyed after 10 milliseconds. |
| 2649 EXPECT_TRUE_WAIT(destroyed(), kTimeout); | 2649 EXPECT_TRUE_WAIT(destroyed(), kTimeout); |
| 2650 } | 2650 } |
| OLD | NEW |