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 4257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4268 candidate1.set_address(rtc::SocketAddress("1.1.1.1", 5000)); | 4268 candidate1.set_address(rtc::SocketAddress("1.1.1.1", 5000)); |
4269 candidate1.set_component(1); | 4269 candidate1.set_component(1); |
4270 JsepIceCandidate ice_candidate(kMediaContentName1, kMediaContentIndex1, | 4270 JsepIceCandidate ice_candidate(kMediaContentName1, kMediaContentIndex1, |
4271 candidate1); | 4271 candidate1); |
4272 EXPECT_TRUE(session_->ProcessIceMessage(&ice_candidate)); | 4272 EXPECT_TRUE(session_->ProcessIceMessage(&ice_candidate)); |
4273 | 4273 |
4274 answer = CreateAnswer(); | 4274 answer = CreateAnswer(); |
4275 SetLocalDescriptionWithoutError(answer); | 4275 SetLocalDescriptionWithoutError(answer); |
4276 } | 4276 } |
4277 | 4277 |
| 4278 #ifdef USE_QUIC |
| 4279 // Test that when the local session description specifies QUIC and is an offer, |
| 4280 // then QUIC is used. |
| 4281 TEST_P(WebRtcSessionTest, TestUseQuicTransportWithLocalQuicOffer) { |
| 4282 InitWithDtls(GetParam()); |
| 4283 SessionDescriptionInterface* offer = CreateOffer(); |
| 4284 offer->description()->set_quic(true); |
| 4285 EXPECT_EQ(nullptr, session_->quic_transport_channel()); |
| 4286 SetLocalDescriptionWithoutError(offer); |
| 4287 EXPECT_NE(nullptr, session_->quic_transport_channel()); |
| 4288 EXPECT_EQ(cricket::DCT_QUIC, session_->data_channel_type()); |
| 4289 } |
| 4290 |
| 4291 // Test that when the remote session description specifies QUIC and is an offer, |
| 4292 // then QUIC is used. |
| 4293 TEST_P(WebRtcSessionTest, TestUseQuicTransportWithRemoteQuicOffer) { |
| 4294 InitWithDtls(GetParam()); |
| 4295 SessionDescriptionInterface* offer = CreateOffer(); |
| 4296 offer->description()->set_quic(true); |
| 4297 EXPECT_EQ(nullptr, session_->quic_transport_channel()); |
| 4298 SetRemoteDescriptionWithoutError(offer); |
| 4299 EXPECT_NE(nullptr, session_->quic_transport_channel()); |
| 4300 EXPECT_EQ(cricket::DCT_QUIC, session_->data_channel_type()); |
| 4301 } |
| 4302 #endif // USE_QUIC |
| 4303 |
4278 // Flaky on Win and Mac only. See webrtc:4943 | 4304 // Flaky on Win and Mac only. See webrtc:4943 |
4279 #if defined(WEBRTC_WIN) || defined(WEBRTC_MAC) | 4305 #if defined(WEBRTC_WIN) || defined(WEBRTC_MAC) |
4280 #define MAYBE_TestRtxRemovedByCreateAnswer DISABLED_TestRtxRemovedByCreateAnswer | 4306 #define MAYBE_TestRtxRemovedByCreateAnswer DISABLED_TestRtxRemovedByCreateAnswer |
4281 #else | 4307 #else |
4282 #define MAYBE_TestRtxRemovedByCreateAnswer TestRtxRemovedByCreateAnswer | 4308 #define MAYBE_TestRtxRemovedByCreateAnswer TestRtxRemovedByCreateAnswer |
4283 #endif | 4309 #endif |
4284 // Tests that RTX codec is removed from the answer when it isn't supported | 4310 // Tests that RTX codec is removed from the answer when it isn't supported |
4285 // by local side. | 4311 // by local side. |
4286 TEST_F(WebRtcSessionTest, MAYBE_TestRtxRemovedByCreateAnswer) { | 4312 TEST_F(WebRtcSessionTest, MAYBE_TestRtxRemovedByCreateAnswer) { |
4287 Init(); | 4313 Init(); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4394 } | 4420 } |
4395 | 4421 |
4396 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4422 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
4397 // currently fails because upon disconnection and reconnection OnIceComplete is | 4423 // currently fails because upon disconnection and reconnection OnIceComplete is |
4398 // called more than once without returning to IceGatheringGathering. | 4424 // called more than once without returning to IceGatheringGathering. |
4399 | 4425 |
4400 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4426 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
4401 WebRtcSessionTest, | 4427 WebRtcSessionTest, |
4402 testing::Values(ALREADY_GENERATED, | 4428 testing::Values(ALREADY_GENERATED, |
4403 DTLS_IDENTITY_STORE)); | 4429 DTLS_IDENTITY_STORE)); |
OLD | NEW |