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

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

Issue 1275703006: Bug 4517: Enable connectivity for demo page when no STUN/TURN specifiefd. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 4 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/stunport.cc ('k') | webrtc/p2p/base/turnport_unittest.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 2009 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2009 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 void CreateSharedStunPort(const rtc::SocketAddress& server_addr) { 76 void CreateSharedStunPort(const rtc::SocketAddress& server_addr) {
77 socket_.reset(socket_factory_.CreateUdpSocket( 77 socket_.reset(socket_factory_.CreateUdpSocket(
78 rtc::SocketAddress(kLocalAddr.ipaddr(), 0), 0, 0)); 78 rtc::SocketAddress(kLocalAddr.ipaddr(), 0), 0, 0));
79 ASSERT_TRUE(socket_ != NULL); 79 ASSERT_TRUE(socket_ != NULL);
80 socket_->SignalReadPacket.connect(this, &StunPortTest::OnReadPacket); 80 socket_->SignalReadPacket.connect(this, &StunPortTest::OnReadPacket);
81 stun_port_.reset(cricket::UDPPort::Create( 81 stun_port_.reset(cricket::UDPPort::Create(
82 rtc::Thread::Current(), &socket_factory_, 82 rtc::Thread::Current(), &socket_factory_,
83 &network_, socket_.get(), 83 &network_, socket_.get(),
84 rtc::CreateRandomString(16), rtc::CreateRandomString(22), 84 rtc::CreateRandomString(16), rtc::CreateRandomString(22),
85 std::string())); 85 std::string(), false));
86 ASSERT_TRUE(stun_port_ != NULL); 86 ASSERT_TRUE(stun_port_ != NULL);
87 ServerAddresses stun_servers; 87 ServerAddresses stun_servers;
88 stun_servers.insert(server_addr); 88 stun_servers.insert(server_addr);
89 stun_port_->set_server_addresses(stun_servers); 89 stun_port_->set_server_addresses(stun_servers);
90 stun_port_->SignalPortComplete.connect(this, 90 stun_port_->SignalPortComplete.connect(this,
91 &StunPortTest::OnPortComplete); 91 &StunPortTest::OnPortComplete);
92 stun_port_->SignalPortError.connect(this, 92 stun_port_->SignalPortError.connect(this,
93 &StunPortTest::OnPortError); 93 &StunPortTest::OnPortError);
94 } 94 }
95 95
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 275
276 ServerAddresses stun_servers; 276 ServerAddresses stun_servers;
277 stun_servers.insert(kStunAddr1); 277 stun_servers.insert(kStunAddr1);
278 stun_servers.insert(kStunAddr2); 278 stun_servers.insert(kStunAddr2);
279 CreateStunPort(stun_servers); 279 CreateStunPort(stun_servers);
280 EXPECT_EQ("stun", port()->Type()); 280 EXPECT_EQ("stun", port()->Type());
281 PrepareAddress(); 281 PrepareAddress();
282 EXPECT_TRUE_WAIT(done(), kTimeoutMs); 282 EXPECT_TRUE_WAIT(done(), kTimeoutMs);
283 EXPECT_EQ(2U, port()->Candidates().size()); 283 EXPECT_EQ(2U, port()->Candidates().size());
284 } 284 }
OLDNEW
« no previous file with comments | « webrtc/p2p/base/stunport.cc ('k') | webrtc/p2p/base/turnport_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698