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

Side by Side Diff: webrtc/p2p/client/portallocator_unittest.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: google::int32 Created 5 years, 3 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
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 236 }
237 } 237 }
238 } 238 }
239 239
240 // This function starts the port/address gathering and check the existence of 240 // This function starts the port/address gathering and check the existence of
241 // candidates as specified. When |expect_stun_candidate| is true, 241 // candidates as specified. When |expect_stun_candidate| is true,
242 // |stun_candidate_addr| carries the expected reflective address, which is 242 // |stun_candidate_addr| carries the expected reflective address, which is
243 // also the related address for TURN candidate if it is expected. Otherwise, 243 // also the related address for TURN candidate if it is expected. Otherwise,
244 // it should be ignore. 244 // it should be ignore.
245 void CheckDisableAdapterEnumeration( 245 void CheckDisableAdapterEnumeration(
246 uint32 total_ports, 246 uint32_t total_ports,
247 const rtc::IPAddress& host_candidate_addr, 247 const rtc::IPAddress& host_candidate_addr,
248 const rtc::IPAddress& stun_candidate_addr, 248 const rtc::IPAddress& stun_candidate_addr,
249 const rtc::IPAddress& relay_candidate_udp_transport_addr, 249 const rtc::IPAddress& relay_candidate_udp_transport_addr,
250 const rtc::IPAddress& relay_candidate_tcp_transport_addr) { 250 const rtc::IPAddress& relay_candidate_tcp_transport_addr) {
251 if (!session_) { 251 if (!session_) {
252 EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTP)); 252 EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTP));
253 } 253 }
254 session_->set_flags(session_->flags() | 254 session_->set_flags(session_->flags() |
255 cricket::PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION | 255 cricket::PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION |
256 cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET); 256 cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET);
257 allocator().set_allow_tcp_listen(false); 257 allocator().set_allow_tcp_listen(false);
258 session_->StartGettingPorts(); 258 session_->StartGettingPorts();
259 EXPECT_TRUE_WAIT(candidate_allocation_done_, kDefaultAllocationTimeout); 259 EXPECT_TRUE_WAIT(candidate_allocation_done_, kDefaultAllocationTimeout);
260 260
261 uint32 total_candidates = 0; 261 uint32_t total_candidates = 0;
262 if (!host_candidate_addr.IsNil()) { 262 if (!host_candidate_addr.IsNil()) {
263 EXPECT_PRED5(CheckCandidate, candidates_[total_candidates], 263 EXPECT_PRED5(CheckCandidate, candidates_[total_candidates],
264 cricket::ICE_CANDIDATE_COMPONENT_RTP, "local", "udp", 264 cricket::ICE_CANDIDATE_COMPONENT_RTP, "local", "udp",
265 rtc::SocketAddress(host_candidate_addr, 0)); 265 rtc::SocketAddress(host_candidate_addr, 0));
266 ++total_candidates; 266 ++total_candidates;
267 } 267 }
268 if (!stun_candidate_addr.IsNil()) { 268 if (!stun_candidate_addr.IsNil()) {
269 EXPECT_PRED5(CheckCandidate, candidates_[total_candidates], 269 EXPECT_PRED5(CheckCandidate, candidates_[total_candidates],
270 cricket::ICE_CANDIDATE_COMPONENT_RTP, "stun", "udp", 270 cricket::ICE_CANDIDATE_COMPONENT_RTP, "stun", "udp",
271 rtc::SocketAddress(stun_candidate_addr, 0)); 271 rtc::SocketAddress(stun_candidate_addr, 0));
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 cricket::ICE_CANDIDATE_COMPONENT_RTP, "local", "udp", 1211 cricket::ICE_CANDIDATE_COMPONENT_RTP, "local", "udp",
1212 kClientAddr); 1212 kClientAddr);
1213 EXPECT_PRED5(CheckCandidate, candidates_[2], 1213 EXPECT_PRED5(CheckCandidate, candidates_[2],
1214 cricket::ICE_CANDIDATE_COMPONENT_RTP, "local", "tcp", 1214 cricket::ICE_CANDIDATE_COMPONENT_RTP, "local", "tcp",
1215 kClientIPv6Addr); 1215 kClientIPv6Addr);
1216 EXPECT_PRED5(CheckCandidate, candidates_[3], 1216 EXPECT_PRED5(CheckCandidate, candidates_[3],
1217 cricket::ICE_CANDIDATE_COMPONENT_RTP, "local", "tcp", 1217 cricket::ICE_CANDIDATE_COMPONENT_RTP, "local", "tcp",
1218 kClientAddr); 1218 kClientAddr);
1219 EXPECT_EQ(4U, candidates_.size()); 1219 EXPECT_EQ(4U, candidates_.size());
1220 } 1220 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698