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