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 |