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

Side by Side Diff: webrtc/pc/webrtcsession_unittest.cc

Issue 2677743002: Increase STUN RTOs (Closed)
Patch Set: merge Created 3 years, 10 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/client/basicportallocator_unittest.cc ('k') | no next file » | 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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // Media index of candidates belonging to the first media content. 99 // Media index of candidates belonging to the first media content.
100 static const int kMediaContentIndex0 = 0; 100 static const int kMediaContentIndex0 = 0;
101 static const char kMediaContentName0[] = "audio"; 101 static const char kMediaContentName0[] = "audio";
102 102
103 // Media index of candidates belonging to the second media content. 103 // Media index of candidates belonging to the second media content.
104 static const int kMediaContentIndex1 = 1; 104 static const int kMediaContentIndex1 = 1;
105 static const char kMediaContentName1[] = "video"; 105 static const char kMediaContentName1[] = "video";
106 106
107 static const int kDefaultTimeout = 10000; // 10 seconds. 107 static const int kDefaultTimeout = 10000; // 10 seconds.
108 static const int kIceCandidatesTimeout = 10000; 108 static const int kIceCandidatesTimeout = 10000;
109 // STUN timeout with all retransmissions is a total of 9500ms.
110 static const int kStunTimeout = 9500;
111 109
112 static const char kFakeDtlsFingerprint[] = 110 static const char kFakeDtlsFingerprint[] =
113 "BB:CD:72:F7:2F:D0:BA:43:F3:68:B1:0C:23:72:B6:4A:" 111 "BB:CD:72:F7:2F:D0:BA:43:F3:68:B1:0C:23:72:B6:4A:"
114 "0F:DE:34:06:BC:E0:FE:01:BC:73:C8:6D:F4:65:D5:24"; 112 "0F:DE:34:06:BC:E0:FE:01:BC:73:C8:6D:F4:65:D5:24";
115 113
116 static const char kTooLongIceUfragPwd[] = 114 static const char kTooLongIceUfragPwd[] =
117 "IceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfrag" 115 "IceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfrag"
118 "IceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfrag" 116 "IceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfrag"
119 "IceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfrag" 117 "IceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfrag"
120 "IceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfrag"; 118 "IceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfragIceUfrag";
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 AddInterface(rtc::SocketAddress(kClientAddrHost1, kClientAddrPort)); 1584 AddInterface(rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
1587 AddInterface(rtc::SocketAddress(kClientAddrHost2, kClientAddrPort)); 1585 AddInterface(rtc::SocketAddress(kClientAddrHost2, kClientAddrPort));
1588 fss_->AddRule(false, 1586 fss_->AddRule(false,
1589 rtc::FP_UDP, 1587 rtc::FP_UDP,
1590 rtc::FD_ANY, 1588 rtc::FD_ANY,
1591 rtc::SocketAddress(kClientAddrHost1, kClientAddrPort)); 1589 rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
1592 Init(); 1590 Init();
1593 SendAudioVideoStream1(); 1591 SendAudioVideoStream1();
1594 InitiateCall(); 1592 InitiateCall();
1595 // Since kClientAddrHost1 is blocked, not expecting stun candidates for it. 1593 // Since kClientAddrHost1 is blocked, not expecting stun candidates for it.
1596 EXPECT_TRUE_SIMULATED_WAIT(observer_.oncandidatesready_, kStunTimeout, clock); 1594 EXPECT_TRUE_SIMULATED_WAIT(observer_.oncandidatesready_,
1595 cricket::STUN_TOTAL_TIMEOUT, clock);
1597 EXPECT_EQ(6u, observer_.mline_0_candidates_.size()); 1596 EXPECT_EQ(6u, observer_.mline_0_candidates_.size());
1598 EXPECT_EQ(6u, observer_.mline_1_candidates_.size()); 1597 EXPECT_EQ(6u, observer_.mline_1_candidates_.size());
1599 // Destroy session before scoped fake clock goes out of scope to avoid TSan 1598 // Destroy session before scoped fake clock goes out of scope to avoid TSan
1600 // warning. 1599 // warning.
1601 session_->Close(); 1600 session_->Close();
1602 session_.reset(nullptr); 1601 session_.reset(nullptr);
1603 } 1602 }
1604 1603
1605 TEST_F(WebRtcSessionTest, SetSdpFailedOnInvalidSdp) { 1604 TEST_F(WebRtcSessionTest, SetSdpFailedOnInvalidSdp) {
1606 Init(); 1605 Init();
(...skipping 2733 matching lines...) Expand 10 before | Expand all | Expand 10 after
4340 } 4339 }
4341 4340
4342 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 4341 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
4343 // currently fails because upon disconnection and reconnection OnIceComplete is 4342 // currently fails because upon disconnection and reconnection OnIceComplete is
4344 // called more than once without returning to IceGatheringGathering. 4343 // called more than once without returning to IceGatheringGathering.
4345 4344
4346 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, 4345 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests,
4347 WebRtcSessionTest, 4346 WebRtcSessionTest,
4348 testing::Values(ALREADY_GENERATED, 4347 testing::Values(ALREADY_GENERATED,
4349 DTLS_IDENTITY_STORE)); 4348 DTLS_IDENTITY_STORE));
OLDNEW
« no previous file with comments | « webrtc/p2p/client/basicportallocator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698