Chromium Code Reviews| Index: webrtc/pc/peerconnection_integrationtest.cc |
| diff --git a/webrtc/pc/peerconnection_integrationtest.cc b/webrtc/pc/peerconnection_integrationtest.cc |
| index 2c19c8d93ebfd1360207b873fd73aeb65f0f6635..6386553e9cb8aada6e174edcc57533c3404afad8 100644 |
| --- a/webrtc/pc/peerconnection_integrationtest.cc |
| +++ b/webrtc/pc/peerconnection_integrationtest.cc |
| @@ -1929,11 +1929,35 @@ TEST_F(PeerConnectionIntegrationTest, |
| ASSERT_EQ(1U, inbound_stream_stats.size()); |
| ASSERT_TRUE(inbound_stream_stats[0]->bytes_received.is_defined()); |
| ASSERT_GT(*inbound_stream_stats[0]->bytes_received, 0U); |
| + |
| // TODO(deadbeef): Test that track_id is defined. This is not currently |
| // working since SSRCs are used to match RtpReceivers (and their tracks) with |
| // received stream stats in TrackMediaInfoMap. |
|
Taylor Brandstetter
2017/05/17 01:30:04
Can this TODO be fixed in this CL?
|
| } |
| +// Test that we can successfully get the media related stats (audio level |
| +// etc.) for the unsignaled stream. |
| +TEST_F(PeerConnectionIntegrationTest, |
| + GetMediaStatsForUnsignaledStreamWithNewStatsApi) { |
| + ASSERT_TRUE(CreatePeerConnectionWrappers()); |
| + ConnectFakeSignaling(); |
| + caller()->AddAudioVideoMediaStream(); |
| + // Remove SSRCs and MSIDs from the received offer SDP. |
| + callee()->SetReceivedSdpMunger(RemoveSsrcsAndMsids); |
| + caller()->CreateAndSetAndSignalOffer(); |
| + ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout); |
| + // Wait for one audio frame to be received by the callee. |
| + ExpectNewFramesReceivedWithWait(0, 0, 1, 1, kMaxWaitForFramesMs); |
| + |
| + rtc::scoped_refptr<const webrtc::RTCStatsReport> report = |
| + callee()->NewGetStats(); |
| + ASSERT_NE(nullptr, report); |
| + |
| + auto media_stats = report->GetStatsOfType<webrtc::RTCMediaStreamTrackStats>(); |
| + ASSERT_GT(media_stats.size(), 0); |
| + EXPECT_TRUE(media_stats[0]->audio_level.is_defined()); |
|
Taylor Brandstetter
2017/05/17 01:30:04
This relies on media_stats[0] being the audio trac
|
| +} |
| + |
| // Test that DTLS 1.0 is used if both sides only support DTLS 1.0. |
| TEST_F(PeerConnectionIntegrationTest, EndToEndCallWithDtls10) { |
| PeerConnectionFactory::Options dtls_10_options; |