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 3684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3695 EXPECT_NE(a, f); | 3695 EXPECT_NE(a, f); |
3696 | 3696 |
3697 PeerConnectionInterface::RTCConfiguration g; | 3697 PeerConnectionInterface::RTCConfiguration g; |
3698 g.disable_ipv6 = true; | 3698 g.disable_ipv6 = true; |
3699 EXPECT_NE(a, g); | 3699 EXPECT_NE(a, g); |
3700 | 3700 |
3701 PeerConnectionInterface::RTCConfiguration h( | 3701 PeerConnectionInterface::RTCConfiguration h( |
3702 PeerConnectionInterface::RTCConfigurationType::kAggressive); | 3702 PeerConnectionInterface::RTCConfigurationType::kAggressive); |
3703 EXPECT_NE(a, h); | 3703 EXPECT_NE(a, h); |
3704 } | 3704 } |
3705 | |
Taylor Brandstetter
2017/07/10 21:40:30
nit: Can you add a brief comment explaining this t
korniltsev
2017/07/12 06:51:30
Done.
| |
3706 TEST_F(PeerConnectionInterfaceTest, MediaStreamAddTrackRemoveTrackRenegotiate) { | |
3707 CreatePeerConnectionWithoutDtls(); | |
3708 rtc::scoped_refptr<MediaStreamInterface> stream( | |
3709 pc_factory_->CreateLocalMediaStream(kStreamLabel1)); | |
3710 pc_->AddStream(stream); | |
3711 rtc::scoped_refptr<AudioTrackInterface> audio_track( | |
3712 pc_factory_->CreateAudioTrack("audio_track", nullptr)); | |
3713 rtc::scoped_refptr<VideoTrackInterface> video_track( | |
3714 pc_factory_->CreateVideoTrack( | |
3715 "video_track", pc_factory_->CreateVideoSource( | |
3716 std::unique_ptr<cricket::VideoCapturer>( | |
3717 new cricket::FakeVideoCapturer())))); | |
3718 stream->AddTrack(audio_track); | |
3719 EXPECT_TRUE_WAIT(observer_.renegotiation_needed_, kTimeout); | |
3720 observer_.renegotiation_needed_ = false; | |
3721 | |
3722 stream->AddTrack(video_track); | |
3723 EXPECT_TRUE_WAIT(observer_.renegotiation_needed_, kTimeout); | |
3724 observer_.renegotiation_needed_ = false; | |
3725 | |
3726 stream->RemoveTrack(audio_track); | |
3727 EXPECT_TRUE_WAIT(observer_.renegotiation_needed_, kTimeout); | |
3728 observer_.renegotiation_needed_ = false; | |
3729 | |
3730 stream->RemoveTrack(video_track); | |
3731 EXPECT_TRUE_WAIT(observer_.renegotiation_needed_, kTimeout); | |
3732 observer_.renegotiation_needed_ = false; | |
3733 } | |
OLD | NEW |