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

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

Issue 1277263002: Add instrumentation to track the IceEndpointType. (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
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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // Test that the same address is added only once if two STUN servers are in use. 243 // Test that the same address is added only once if two STUN servers are in use.
244 TEST_F(StunPortTest, TestNoDuplicatedAddressWithTwoStunServers) { 244 TEST_F(StunPortTest, TestNoDuplicatedAddressWithTwoStunServers) {
245 ServerAddresses stun_servers; 245 ServerAddresses stun_servers;
246 stun_servers.insert(kStunAddr1); 246 stun_servers.insert(kStunAddr1);
247 stun_servers.insert(kStunAddr2); 247 stun_servers.insert(kStunAddr2);
248 CreateStunPort(stun_servers); 248 CreateStunPort(stun_servers);
249 EXPECT_EQ("stun", port()->Type()); 249 EXPECT_EQ("stun", port()->Type());
250 PrepareAddress(); 250 PrepareAddress();
251 EXPECT_TRUE_WAIT(done(), kTimeoutMs); 251 EXPECT_TRUE_WAIT(done(), kTimeoutMs);
252 EXPECT_EQ(1U, port()->Candidates().size()); 252 EXPECT_EQ(1U, port()->Candidates().size());
253 EXPECT_EQ(port()->Candidates()[0].relay_protocol(), "");
253 } 254 }
254 255
255 // Test that candidates can be allocated for multiple STUN servers, one of which 256 // Test that candidates can be allocated for multiple STUN servers, one of which
256 // is not reachable. 257 // is not reachable.
257 TEST_F(StunPortTest, TestMultipleStunServersWithBadServer) { 258 TEST_F(StunPortTest, TestMultipleStunServersWithBadServer) {
258 ServerAddresses stun_servers; 259 ServerAddresses stun_servers;
259 stun_servers.insert(kStunAddr1); 260 stun_servers.insert(kStunAddr1);
260 stun_servers.insert(kBadAddr); 261 stun_servers.insert(kBadAddr);
261 CreateStunPort(stun_servers); 262 CreateStunPort(stun_servers);
262 EXPECT_EQ("stun", port()->Type()); 263 EXPECT_EQ("stun", port()->Type());
(...skipping 11 matching lines...) Expand all
274 stun_server_2()->set_fake_stun_addr(kStunMappedAddr2); 275 stun_server_2()->set_fake_stun_addr(kStunMappedAddr2);
275 276
276 ServerAddresses stun_servers; 277 ServerAddresses stun_servers;
277 stun_servers.insert(kStunAddr1); 278 stun_servers.insert(kStunAddr1);
278 stun_servers.insert(kStunAddr2); 279 stun_servers.insert(kStunAddr2);
279 CreateStunPort(stun_servers); 280 CreateStunPort(stun_servers);
280 EXPECT_EQ("stun", port()->Type()); 281 EXPECT_EQ("stun", port()->Type());
281 PrepareAddress(); 282 PrepareAddress();
282 EXPECT_TRUE_WAIT(done(), kTimeoutMs); 283 EXPECT_TRUE_WAIT(done(), kTimeoutMs);
283 EXPECT_EQ(2U, port()->Candidates().size()); 284 EXPECT_EQ(2U, port()->Candidates().size());
285 EXPECT_EQ(port()->Candidates()[0].relay_protocol(), "");
286 EXPECT_EQ(port()->Candidates()[1].relay_protocol(), "");
284 } 287 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698