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

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

Issue 2881973002: Get tests working on systems that only support IPv6. (Closed)
Patch Set: Created 3 years, 7 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 PrepareAddress(); 239 PrepareAddress();
240 EXPECT_TRUE_WAIT(done(), kTimeoutMs); 240 EXPECT_TRUE_WAIT(done(), kTimeoutMs);
241 EXPECT_TRUE(error()); 241 EXPECT_TRUE(error());
242 EXPECT_EQ(0U, port()->Candidates().size()); 242 EXPECT_EQ(0U, port()->Candidates().size());
243 } 243 }
244 244
245 // This test verifies keepalive response messages don't result in 245 // This test verifies keepalive response messages don't result in
246 // additional candidate generation. 246 // additional candidate generation.
247 TEST_F(StunPortTest, TestKeepAliveResponse) { 247 TEST_F(StunPortTest, TestKeepAliveResponse) {
248 SetKeepaliveDelay(500); // 500ms of keepalive delay. 248 SetKeepaliveDelay(500); // 500ms of keepalive delay.
249 CreateStunPort(kStunHostnameAddr); 249 CreateStunPort(kStunAddr1);
250 PrepareAddress(); 250 PrepareAddress();
251 EXPECT_TRUE_SIMULATED_WAIT(done(), kTimeoutMs, fake_clock); 251 EXPECT_TRUE_SIMULATED_WAIT(done(), kTimeoutMs, fake_clock);
252 ASSERT_EQ(1U, port()->Candidates().size()); 252 ASSERT_EQ(1U, port()->Candidates().size());
253 EXPECT_TRUE(kLocalAddr.EqualIPs(port()->Candidates()[0].address())); 253 EXPECT_TRUE(kLocalAddr.EqualIPs(port()->Candidates()[0].address()));
254 SIMULATED_WAIT(false, 1000, fake_clock); 254 SIMULATED_WAIT(false, 1000, fake_clock);
255 EXPECT_EQ(1U, port()->Candidates().size()); 255 EXPECT_EQ(1U, port()->Candidates().size());
256 } 256 }
257 257
258 // Test that a local candidate can be generated using a shared socket. 258 // Test that a local candidate can be generated using a shared socket.
259 TEST_F(StunPortTest, TestSharedSocketPrepareAddress) { 259 TEST_F(StunPortTest, TestSharedSocketPrepareAddress) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 // Test that by default, the STUN binding requests will last for a long time. 380 // Test that by default, the STUN binding requests will last for a long time.
381 TEST_F(StunPortTest, TestStunBindingRequestLongLifetime) { 381 TEST_F(StunPortTest, TestStunBindingRequestLongLifetime) {
382 SetKeepaliveDelay(101); 382 SetKeepaliveDelay(101);
383 CreateStunPort(kStunAddr1); 383 CreateStunPort(kStunAddr1);
384 PrepareAddress(); 384 PrepareAddress();
385 EXPECT_TRUE_SIMULATED_WAIT(done(), kTimeoutMs, fake_clock); 385 EXPECT_TRUE_SIMULATED_WAIT(done(), kTimeoutMs, fake_clock);
386 EXPECT_TRUE_SIMULATED_WAIT( 386 EXPECT_TRUE_SIMULATED_WAIT(
387 port()->HasPendingRequest(cricket::STUN_BINDING_REQUEST), 1000, 387 port()->HasPendingRequest(cricket::STUN_BINDING_REQUEST), 1000,
388 fake_clock); 388 fake_clock);
389 } 389 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698