OLD | NEW |
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 2227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2238 candidates = local_desc->candidates(kMediaContentIndex0); | 2238 candidates = local_desc->candidates(kMediaContentIndex0); |
2239 ASSERT_TRUE(candidates != NULL); | 2239 ASSERT_TRUE(candidates != NULL); |
2240 EXPECT_LT(0u, candidates->count()); | 2240 EXPECT_LT(0u, candidates->count()); |
2241 candidates = local_desc->candidates(1); | 2241 candidates = local_desc->candidates(1); |
2242 ASSERT_TRUE(candidates != NULL); | 2242 ASSERT_TRUE(candidates != NULL); |
2243 EXPECT_EQ(0u, candidates->count()); | 2243 EXPECT_EQ(0u, candidates->count()); |
2244 | 2244 |
2245 candidates = local_desc->candidates(kMediaContentIndex0); | 2245 candidates = local_desc->candidates(kMediaContentIndex0); |
2246 size_t num_local_candidates = candidates->count(); | 2246 size_t num_local_candidates = candidates->count(); |
2247 // Enable Continual Gathering | 2247 // Enable Continual Gathering |
2248 session_->SetIceConfig(cricket::IceConfig(-1, -1, true, false, -1)); | 2248 session_->SetIceConfig(cricket::IceConfig(-1, -1, true, false, -1, true)); |
2249 // Bring down the network interface to trigger candidate removals. | 2249 // Bring down the network interface to trigger candidate removals. |
2250 RemoveInterface(rtc::SocketAddress(kClientAddrHost1, kClientAddrPort)); | 2250 RemoveInterface(rtc::SocketAddress(kClientAddrHost1, kClientAddrPort)); |
2251 // Verify that all local candidates are removed. | 2251 // Verify that all local candidates are removed. |
2252 EXPECT_EQ(0, observer_.num_candidates_removed_); | 2252 EXPECT_EQ(0, observer_.num_candidates_removed_); |
2253 EXPECT_EQ_WAIT(num_local_candidates, observer_.num_candidates_removed_, | 2253 EXPECT_EQ_WAIT(num_local_candidates, observer_.num_candidates_removed_, |
2254 kIceCandidatesTimeout); | 2254 kIceCandidatesTimeout); |
2255 EXPECT_EQ_WAIT(0u, candidates->count(), kIceCandidatesTimeout); | 2255 EXPECT_EQ_WAIT(0u, candidates->count(), kIceCandidatesTimeout); |
2256 } | 2256 } |
2257 | 2257 |
2258 // Tests that if continual gathering is disabled, local candidates won't be | 2258 // Tests that if continual gathering is disabled, local candidates won't be |
(...skipping 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4417 } | 4417 } |
4418 | 4418 |
4419 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4419 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
4420 // currently fails because upon disconnection and reconnection OnIceComplete is | 4420 // currently fails because upon disconnection and reconnection OnIceComplete is |
4421 // called more than once without returning to IceGatheringGathering. | 4421 // called more than once without returning to IceGatheringGathering. |
4422 | 4422 |
4423 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4423 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
4424 WebRtcSessionTest, | 4424 WebRtcSessionTest, |
4425 testing::Values(ALREADY_GENERATED, | 4425 testing::Values(ALREADY_GENERATED, |
4426 DTLS_IDENTITY_STORE)); | 4426 DTLS_IDENTITY_STORE)); |
OLD | NEW |