Index: talk/app/webrtc/peerconnectioninterface_unittest.cc |
diff --git a/talk/app/webrtc/peerconnectioninterface_unittest.cc b/talk/app/webrtc/peerconnectioninterface_unittest.cc |
index 930f538ebdfda264da623bd1cc03e0182d6a16e8..098f8aee692fc5c8112e718b9e436827747ae077 100644 |
--- a/talk/app/webrtc/peerconnectioninterface_unittest.cc |
+++ b/talk/app/webrtc/peerconnectioninterface_unittest.cc |
@@ -1198,6 +1198,22 @@ TEST_F(PeerConnectionInterfaceTest, RemoveTrackAfterAddStream) { |
EXPECT_TRUE(video_desc == nullptr); |
} |
+// Test creating a sender with a stream ID, and ensure the ID is populated |
+// in the offer. |
+TEST_F(PeerConnectionInterfaceTest, CreateSenderWithStream) { |
+ CreatePeerConnection(); |
+ pc_->CreateSender("video", kStreamLabel1); |
+ |
+ scoped_ptr<SessionDescriptionInterface> offer; |
+ ASSERT_TRUE(DoCreateOffer(offer.use(), nullptr)); |
+ |
+ const cricket::MediaContentDescription* video_desc = |
+ cricket::GetFirstVideoContentDescription(offer->description()); |
+ ASSERT_TRUE(video_desc != nullptr); |
+ ASSERT_EQ(1u, video_desc->streams().size()); |
+ EXPECT_EQ(kStreamLabel1, video_desc->streams()[0].sync_label); |
+} |
+ |
// Test that we can specify a certain track that we want statistics about. |
TEST_F(PeerConnectionInterfaceTest, GetStatsForSpecificTrack) { |
InitiateCall(); |