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

Unified Diff: webrtc/pc/statscollector_unittest.cc

Issue 2863123002: Wire up BWE stats through WebrtcSession so that they are filled in both for audio and video calls. (Closed)
Patch Set: Comments addressed." Created 3 years, 7 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/pc/statscollector.cc ('k') | webrtc/pc/test/mock_webrtcsession.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/statscollector_unittest.cc
diff --git a/webrtc/pc/statscollector_unittest.cc b/webrtc/pc/statscollector_unittest.cc
index 7d75f6530293857461adcc535e2571d67014b355..e9a2c5c9d56deddf7dc48b563ce391b0b688a6a8 100644
--- a/webrtc/pc/statscollector_unittest.cc
+++ b/webrtc/pc/statscollector_unittest.cc
@@ -938,12 +938,15 @@ TEST_F(StatsCollectorTest, BandwidthEstimationInfoIsReported) {
video_sender_info.add_ssrc(1234);
video_sender_info.bytes_sent = kBytesSent;
stats_read.senders.push_back(video_sender_info);
- cricket::BandwidthEstimationInfo bwe;
- const int kTargetEncBitrate = 123456;
- const std::string kTargetEncBitrateString("123456");
- bwe.target_enc_bitrate = kTargetEncBitrate;
- stats_read.bw_estimations.push_back(bwe);
+ webrtc::Call::Stats call_stats;
+ const int kSendBandwidth = 1234567;
+ const int kRecvBandwidth = 12345678;
+ const int kPacerDelay = 123;
+ call_stats.send_bandwidth_bps = kSendBandwidth;
+ call_stats.recv_bandwidth_bps = kRecvBandwidth;
+ call_stats.pacer_delay_ms = kPacerDelay;
+ EXPECT_CALL(session_, GetCallStats()).WillRepeatedly(Return(call_stats));
EXPECT_CALL(session_, video_channel()).WillRepeatedly(Return(&video_channel));
EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull());
EXPECT_CALL(*media_channel, GetStats(_))
@@ -954,9 +957,15 @@ TEST_F(StatsCollectorTest, BandwidthEstimationInfoIsReported) {
std::string result = ExtractSsrcStatsValue(reports,
StatsReport::kStatsValueNameBytesSent);
EXPECT_EQ(kBytesSentString, result);
- result = ExtractBweStatsValue(reports,
- StatsReport::kStatsValueNameTargetEncBitrate);
- EXPECT_EQ(kTargetEncBitrateString, result);
+ result = ExtractBweStatsValue(
+ reports, StatsReport::kStatsValueNameAvailableSendBandwidth);
+ EXPECT_EQ(rtc::ToString(kSendBandwidth), result);
+ result = ExtractBweStatsValue(
+ reports, StatsReport::kStatsValueNameAvailableReceiveBandwidth);
+ EXPECT_EQ(rtc::ToString(kRecvBandwidth), result);
+ result =
+ ExtractBweStatsValue(reports, StatsReport::kStatsValueNameBucketDelay);
+ EXPECT_EQ(rtc::ToString(kPacerDelay), result);
}
// This test verifies that an object of type "googSession" always
« no previous file with comments | « webrtc/pc/statscollector.cc ('k') | webrtc/pc/test/mock_webrtcsession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698