Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: webrtc/api/peerconnection_unittest.cc

Issue 2600153004: Adding support for Unified Plan offer/answer negotiation.
Patch Set: Got tests working (aside from ones that need to be completely rewritten) Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/peerconnection.cc ('k') | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnection_unittest.cc
diff --git a/webrtc/api/peerconnection_unittest.cc b/webrtc/api/peerconnection_unittest.cc
index 4f34cfa83e9fe95bd305dcd8beacbeb1c38d6a16..79e955195536880051b087e98156bf3bc9d0578f 100644
--- a/webrtc/api/peerconnection_unittest.cc
+++ b/webrtc/api/peerconnection_unittest.cc
@@ -717,9 +717,10 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver,
dtmf_sender->UnregisterObserver();
}
- // Verifies that the SessionDescription have rejected the appropriate media
- // content.
- void VerifyRejectedMediaInSessionDescription() {
+ // Verifies that the direction attribute is set correctly in the local
+ // description
+ // according to the options set.
+ void VerifyRecvDirectionInSessionDescription() {
ASSERT_TRUE(peer_connection_->remote_description() != nullptr);
ASSERT_TRUE(peer_connection_->local_description() != nullptr);
const cricket::SessionDescription* remote_desc =
@@ -731,14 +732,24 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver,
if (remote_audio_content) {
const ContentInfo* audio_content =
GetFirstAudioContent(local_desc);
- EXPECT_EQ(can_receive_audio(), !audio_content->rejected);
+ EXPECT_EQ(can_receive_audio(),
+ cricket::RtpTransceiverDirection::FromMediaContentDirection(
+ static_cast<const MediaContentDescription*>(
+ audio_content->description)
+ ->direction())
+ .recv);
}
const ContentInfo* remote_video_content = GetFirstVideoContent(remote_desc);
if (remote_video_content) {
const ContentInfo* video_content =
GetFirstVideoContent(local_desc);
- EXPECT_EQ(can_receive_video(), !video_content->rejected);
+ EXPECT_EQ(can_receive_video(),
+ cricket::RtpTransceiverDirection::FromMediaContentDirection(
+ static_cast<const MediaContentDescription*>(
+ video_content->description)
+ ->direction())
+ .recv);
}
}
@@ -1324,8 +1335,8 @@ class P2PTestConductor : public testing::Test {
}
void VerifySessionDescriptions() {
- initiating_client_->VerifyRejectedMediaInSessionDescription();
- receiving_client_->VerifyRejectedMediaInSessionDescription();
+ initiating_client_->VerifyRecvDirectionInSessionDescription();
+ receiving_client_->VerifyRecvDirectionInSessionDescription();
initiating_client_->VerifyLocalIceUfragAndPassword();
receiving_client_->VerifyLocalIceUfragAndPassword();
}
« no previous file with comments | « webrtc/api/peerconnection.cc ('k') | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698