Chromium Code Reviews| Index: webrtc/pc/peerconnection_integrationtest.cc |
| diff --git a/webrtc/pc/peerconnection_integrationtest.cc b/webrtc/pc/peerconnection_integrationtest.cc |
| index b4acdaa423f7851b08ee4b2d6e7ec2288e7ef29f..d818300c23f1fe4846d899b3eab589ced74fe771 100644 |
| --- a/webrtc/pc/peerconnection_integrationtest.cc |
| +++ b/webrtc/pc/peerconnection_integrationtest.cc |
| @@ -2755,6 +2755,24 @@ TEST_F(PeerConnectionIntegrationTest, CodecNamesAreCaseInsensitive) { |
| kMaxWaitForFramesMs); |
| } |
| +TEST_F(PeerConnectionIntegrationTest, GetSources) { |
| + ASSERT_TRUE(CreatePeerConnectionWrappers()); |
| + ConnectFakeSignaling(); |
| + caller()->AddAudioOnlyMediaStream(); |
| + caller()->CreateAndSetAndSignalOffer(); |
| + ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout); |
| + // Wait for one audio frame received by callee. |
| + ExpectNewFramesReceivedWithWait(0, 0, 1, 0, kMaxWaitForFramesMs); |
| + ASSERT_GT(callee()->pc()->GetReceivers().size(), 0u); |
| + auto receiver = callee()->pc()->GetReceivers()[0]; |
| + ASSERT_EQ(receiver->media_type(), cricket::MEDIA_TYPE_AUDIO); |
| + |
| + auto contributing_sources = receiver->GetSources(); |
| + ASSERT_GT(receiver->GetParameters().encodings.size(), 0u); |
| + EXPECT_EQ(receiver->GetParameters().encodings[0].ssrc, |
| + contributing_sources[0].source_id()); |
| +} |
|
hbos
2017/04/06 08:17:17
Should we have the same test but for video too? Th
Zhi Huang
2017/04/06 22:30:25
To unblock the Thor team, this only works for audi
hbos
2017/04/07 08:22:21
Acknowledged.
|
| + |
| } // namespace |
| #endif // if !defined(THREAD_SANITIZER) |