[Unified Plan] Implement FiredDirection for RtpTransceiver

Bug: webrtc:9236
Change-Id: Ib5a8215f3762f35b68d2a285c7d676f93f1212c5
Reviewed-on: https://webrtc-review.googlesource.com/88921
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24010}
This commit is contained in:
Steve Anton
2018-07-17 14:25:36 -07:00
parent dbdb3a0079
commit 0f5400acfa
7 changed files with 146 additions and 59 deletions

View File

@ -3292,15 +3292,7 @@ TEST_P(PeerConnectionInterfaceTest, OnAddTrackCallback) {
// Create and set the updated remote SDP.
CreateAndSetRemoteOffer(kSdpStringWithStream1PlanB);
if (sdp_semantics_ == SdpSemantics::kPlanB) {
EXPECT_EQ(observer_.num_added_tracks_, 2);
} else {
// With Unified Plan, OnAddTrack will fire every time SetRemoteDescription
// is called until the offer/answer exchange is complete. So in this case
// OnAddTrack is fired twice for the first audio track plus the one time
// for the video track.
EXPECT_EQ(observer_.num_added_tracks_, 3);
}
EXPECT_EQ(observer_.num_added_tracks_, 2);
EXPECT_EQ(observer_.last_added_track_label_, kVideoTracks[0]);
}