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

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

Issue 1411253008: WebRTC should generate default private address even when adapter enumeration is disabled. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: after rebase on master Created 5 years, 1 month 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/base/network_unittest.cc ('k') | webrtc/p2p/base/portallocator.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 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 port2->SetIceRole(cricket::ICEROLE_CONTROLLED); 449 port2->SetIceRole(cricket::ICEROLE_CONTROLLED);
450 TestConnectivity("ssltcp", port1, RelayName(rtype, proto), port2, 450 TestConnectivity("ssltcp", port1, RelayName(rtype, proto), port2,
451 rtype == RELAY_GTURN, false, true, true); 451 rtype == RELAY_GTURN, false, true, true);
452 } 452 }
453 // helpers for above functions 453 // helpers for above functions
454 UDPPort* CreateUdpPort(const SocketAddress& addr) { 454 UDPPort* CreateUdpPort(const SocketAddress& addr) {
455 return CreateUdpPort(addr, &socket_factory_); 455 return CreateUdpPort(addr, &socket_factory_);
456 } 456 }
457 UDPPort* CreateUdpPort(const SocketAddress& addr, 457 UDPPort* CreateUdpPort(const SocketAddress& addr,
458 PacketSocketFactory* socket_factory) { 458 PacketSocketFactory* socket_factory) {
459 return UDPPort::Create(main_, socket_factory, &network_, 459 return UDPPort::Create(main_, socket_factory, &network_, addr.ipaddr(), 0,
460 addr.ipaddr(), 0, 0, username_, password_, 460 0, username_, password_, std::string(), true);
461 std::string(), false);
462 } 461 }
463 TCPPort* CreateTcpPort(const SocketAddress& addr) { 462 TCPPort* CreateTcpPort(const SocketAddress& addr) {
464 return CreateTcpPort(addr, &socket_factory_); 463 return CreateTcpPort(addr, &socket_factory_);
465 } 464 }
466 TCPPort* CreateTcpPort(const SocketAddress& addr, 465 TCPPort* CreateTcpPort(const SocketAddress& addr,
467 PacketSocketFactory* socket_factory) { 466 PacketSocketFactory* socket_factory) {
468 return TCPPort::Create(main_, socket_factory, &network_, 467 return TCPPort::Create(main_, socket_factory, &network_,
469 addr.ipaddr(), 0, 0, username_, password_, 468 addr.ipaddr(), 0, 0, username_, password_,
470 true); 469 true);
471 } 470 }
(...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after
2443 StartConnectAndStopChannels(&ch1, &ch2); 2442 StartConnectAndStopChannels(&ch1, &ch2);
2444 // Switch the role after all connections are destroyed. 2443 // Switch the role after all connections are destroyed.
2445 EXPECT_TRUE_WAIT(ch2.conn() == nullptr, kTimeout); 2444 EXPECT_TRUE_WAIT(ch2.conn() == nullptr, kTimeout);
2446 port1->SetIceRole(cricket::ICEROLE_CONTROLLED); 2445 port1->SetIceRole(cricket::ICEROLE_CONTROLLED);
2447 port2->SetIceRole(cricket::ICEROLE_CONTROLLING); 2446 port2->SetIceRole(cricket::ICEROLE_CONTROLLING);
2448 2447
2449 // After the connection is destroyed, the port should not be destroyed. 2448 // After the connection is destroyed, the port should not be destroyed.
2450 rtc::Thread::Current()->ProcessMessages(kTimeout); 2449 rtc::Thread::Current()->ProcessMessages(kTimeout);
2451 EXPECT_FALSE(destroyed()); 2450 EXPECT_FALSE(destroyed());
2452 } 2451 }
OLDNEW
« no previous file with comments | « webrtc/base/network_unittest.cc ('k') | webrtc/p2p/base/portallocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698