Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 357 : media_engine_(new cricket::FakeMediaEngine()), | 357 : media_engine_(new cricket::FakeMediaEngine()), |
| 358 data_engine_(new cricket::FakeDataEngine()), | 358 data_engine_(new cricket::FakeDataEngine()), |
| 359 channel_manager_( | 359 channel_manager_( |
| 360 new cricket::ChannelManager(media_engine_, | 360 new cricket::ChannelManager(media_engine_, |
| 361 data_engine_, | 361 data_engine_, |
| 362 new cricket::CaptureManager(), | 362 new cricket::CaptureManager(), |
| 363 rtc::Thread::Current())), | 363 rtc::Thread::Current())), |
| 364 fake_call_(webrtc::Call::Config()), | 364 fake_call_(webrtc::Call::Config()), |
| 365 media_controller_( | 365 media_controller_( |
| 366 webrtc::MediaControllerInterface::Create(rtc::Thread::Current(), | 366 webrtc::MediaControllerInterface::Create(rtc::Thread::Current(), |
| 367 webrtc::MediaConfig(), | |
| 367 channel_manager_.get())), | 368 channel_manager_.get())), |
| 368 tdesc_factory_(new cricket::TransportDescriptionFactory()), | 369 tdesc_factory_(new cricket::TransportDescriptionFactory()), |
| 369 desc_factory_( | 370 desc_factory_( |
| 370 new cricket::MediaSessionDescriptionFactory(channel_manager_.get(), | 371 new cricket::MediaSessionDescriptionFactory(channel_manager_.get(), |
| 371 tdesc_factory_.get())), | 372 tdesc_factory_.get())), |
| 372 pss_(new rtc::PhysicalSocketServer), | 373 pss_(new rtc::PhysicalSocketServer), |
| 373 vss_(new rtc::VirtualSocketServer(pss_.get())), | 374 vss_(new rtc::VirtualSocketServer(pss_.get())), |
| 374 fss_(new rtc::FirewallSocketServer(vss_.get())), | 375 fss_(new rtc::FirewallSocketServer(vss_.get())), |
| 375 ss_scope_(fss_.get()), | 376 ss_scope_(fss_.get()), |
| 376 stun_socket_addr_( | 377 stun_socket_addr_( |
| (...skipping 3690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4067 ASSERT_TRUE(audio != NULL); | 4068 ASSERT_TRUE(audio != NULL); |
| 4068 ASSERT_TRUE(audio->description.identity_fingerprint.get() == NULL); | 4069 ASSERT_TRUE(audio->description.identity_fingerprint.get() == NULL); |
| 4069 audio->description.identity_fingerprint.reset( | 4070 audio->description.identity_fingerprint.reset( |
| 4070 rtc::SSLFingerprint::CreateFromRfc4572( | 4071 rtc::SSLFingerprint::CreateFromRfc4572( |
| 4071 rtc::DIGEST_SHA_256, kFakeDtlsFingerprint)); | 4072 rtc::DIGEST_SHA_256, kFakeDtlsFingerprint)); |
| 4072 SetRemoteDescriptionOfferExpectError(kSdpWithoutSdesCrypto, | 4073 SetRemoteDescriptionOfferExpectError(kSdpWithoutSdesCrypto, |
| 4073 offer); | 4074 offer); |
| 4074 } | 4075 } |
| 4075 | 4076 |
| 4076 // This test verifies DSCP is properly applied on the media channels. | 4077 // This test verifies DSCP is properly applied on the media channels. |
| 4077 TEST_F(WebRtcSessionTest, TestDscpConstraint) { | 4078 // TODO(nisse): Test needs refactoring, see cl |
| 4079 // https://codereview.webrtc.org/1646253004 | |
| 4080 TEST_F(WebRtcSessionTest, DISABLED_TestDscpConstraint) { | |
| 4081 #if 0 | |
|
pthatcher1
2016/02/05 17:11:30
Are you going to fix this in this CL?
nisse-webrtc
2016/02/08 09:02:32
Yes. I think the previous cl (https://codereview.w
nisse-webrtc
2016/02/08 12:22:30
I'm getting into trouble with the webrtcsession un
pthatcher1
2016/02/08 19:03:01
I agree that the right thing to do is move it to p
| |
| 4078 constraints_.reset(new FakeConstraints()); | 4082 constraints_.reset(new FakeConstraints()); |
| 4079 constraints_->AddOptional( | 4083 constraints_->AddOptional( |
| 4080 webrtc::MediaConstraintsInterface::kEnableDscp, true); | 4084 webrtc::MediaConstraintsInterface::kEnableDscp, true); |
| 4081 Init(); | 4085 Init(); |
| 4082 SendAudioVideoStream1(); | 4086 SendAudioVideoStream1(); |
| 4083 SessionDescriptionInterface* offer = CreateOffer(); | 4087 SessionDescriptionInterface* offer = CreateOffer(); |
| 4084 | 4088 |
| 4085 SetLocalDescriptionWithoutError(offer); | 4089 SetLocalDescriptionWithoutError(offer); |
| 4086 | 4090 |
| 4087 video_channel_ = media_engine_->GetVideoChannel(0); | 4091 video_channel_ = media_engine_->GetVideoChannel(0); |
| 4088 voice_channel_ = media_engine_->GetVoiceChannel(0); | 4092 voice_channel_ = media_engine_->GetVoiceChannel(0); |
| 4089 | 4093 |
| 4090 ASSERT_TRUE(video_channel_ != NULL); | 4094 ASSERT_TRUE(video_channel_ != NULL); |
| 4091 ASSERT_TRUE(voice_channel_ != NULL); | 4095 ASSERT_TRUE(voice_channel_ != NULL); |
| 4092 const cricket::AudioOptions& audio_options = voice_channel_->options(); | 4096 const cricket::AudioOptions& audio_options = voice_channel_->options(); |
| 4093 const cricket::VideoOptions& video_options = video_channel_->options(); | 4097 const cricket::VideoOptions& video_options = video_channel_->options(); |
| 4094 EXPECT_EQ(rtc::Optional<bool>(true), audio_options.dscp); | 4098 EXPECT_EQ(rtc::Optional<bool>(true), audio_options.dscp); |
| 4095 EXPECT_EQ(rtc::Optional<bool>(true), video_options.dscp); | 4099 EXPECT_EQ(rtc::Optional<bool>(true), video_options.dscp); |
| 4100 #endif | |
| 4096 } | 4101 } |
| 4097 | 4102 |
| 4098 TEST_F(WebRtcSessionTest, TestSuspendBelowMinBitrateConstraint) { | 4103 TEST_F(WebRtcSessionTest, TestSuspendBelowMinBitrateConstraint) { |
| 4099 constraints_.reset(new FakeConstraints()); | 4104 constraints_.reset(new FakeConstraints()); |
| 4100 constraints_->AddOptional( | 4105 constraints_->AddOptional( |
| 4101 webrtc::MediaConstraintsInterface::kEnableVideoSuspendBelowMinBitrate, | 4106 webrtc::MediaConstraintsInterface::kEnableVideoSuspendBelowMinBitrate, |
| 4102 true); | 4107 true); |
| 4103 Init(); | 4108 Init(); |
| 4104 SendAudioVideoStream1(); | 4109 SendAudioVideoStream1(); |
| 4105 SessionDescriptionInterface* offer = CreateOffer(); | 4110 SessionDescriptionInterface* offer = CreateOffer(); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4310 } | 4315 } |
| 4311 | 4316 |
| 4312 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4317 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
| 4313 // currently fails because upon disconnection and reconnection OnIceComplete is | 4318 // currently fails because upon disconnection and reconnection OnIceComplete is |
| 4314 // called more than once without returning to IceGatheringGathering. | 4319 // called more than once without returning to IceGatheringGathering. |
| 4315 | 4320 |
| 4316 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4321 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
| 4317 WebRtcSessionTest, | 4322 WebRtcSessionTest, |
| 4318 testing::Values(ALREADY_GENERATED, | 4323 testing::Values(ALREADY_GENERATED, |
| 4319 DTLS_IDENTITY_STORE)); | 4324 DTLS_IDENTITY_STORE)); |
| OLD | NEW |