Test creating two senders with the same track.
When https://crbug.com/webrtc/8734 is resolved this setup should be valid and CreateOffer() and SetLocalDescription() should work, but currently it doesn't. It probably fails because both senders are assigned the same ID (the track ID). EXPECT-ing the current behavior with a TODO referencing the bug. Bug: webrtc:8734 Change-Id: If2a9cc9b0be12c39def83b0e219e1ca82dbd7d65 Reviewed-on: https://webrtc-review.googlesource.com/39041 Reviewed-by: Steve Anton <steveanton@webrtc.org> Commit-Queue: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21654}
This commit is contained in:
parent
1880c7162b
commit
91d039b37f
@ -866,4 +866,27 @@ TEST_F(PeerConnectionRtpUnifiedPlanTest,
|
||||
EXPECT_FALSE(caller->observer()->negotiation_needed());
|
||||
}
|
||||
|
||||
// Sender setups in a call.
|
||||
|
||||
class PeerConnectionSenderTest : public PeerConnectionRtpTest {};
|
||||
|
||||
TEST_F(PeerConnectionSenderTest, CreateTwoSendersWithSameTrack) {
|
||||
auto caller = CreatePeerConnection();
|
||||
auto callee = CreatePeerConnection();
|
||||
|
||||
auto track = caller->CreateAudioTrack("audio_track");
|
||||
auto sender1 = caller->AddTrack(track);
|
||||
ASSERT_TRUE(sender1);
|
||||
// We need to temporarily reset the track for the subsequent AddTrack() to
|
||||
// succeed.
|
||||
EXPECT_TRUE(sender1->SetTrack(nullptr));
|
||||
auto sender2 = caller->AddTrack(track);
|
||||
EXPECT_TRUE(sender2);
|
||||
EXPECT_TRUE(sender1->SetTrack(track));
|
||||
|
||||
// TODO(hbos): When https://crbug.com/webrtc/8734 is resolved, this should
|
||||
// return true, and doing |callee->SetRemoteDescription()| should work.
|
||||
EXPECT_FALSE(caller->CreateOfferAndSetAsLocal());
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user