Index: webrtc/pc/rtcstatscollector_unittest.cc |
diff --git a/webrtc/pc/rtcstatscollector_unittest.cc b/webrtc/pc/rtcstatscollector_unittest.cc |
index 1940da69daed9e4f519ea39e287f0360b3184a50..7b7863212658fbd442e70b8ac5c7116b6db374a3 100644 |
--- a/webrtc/pc/rtcstatscollector_unittest.cc |
+++ b/webrtc/pc/rtcstatscollector_unittest.cc |
@@ -1263,9 +1263,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidatePairStats) { |
// Mock the session to return bandwidth estimation info. These should only |
// be used for a selected candidate pair. |
cricket::VideoMediaInfo video_media_info; |
- video_media_info.bw_estimations.push_back(cricket::BandwidthEstimationInfo()); |
- video_media_info.bw_estimations[0].available_send_bandwidth = 8888; |
- video_media_info.bw_estimations[0].available_recv_bandwidth = 9999; |
EXPECT_CALL(*video_media_channel, GetStats(_)) |
.WillOnce(DoAll(SetArgPointee<0>(video_media_info), Return(true))); |
EXPECT_CALL(test_->session(), video_channel()) |
@@ -1345,8 +1342,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidatePairStats) { |
.channel_stats[0] |
.connection_infos[0] |
.best_connection = true; |
- video_media_info.bw_estimations[0].available_send_bandwidth = 0; |
- video_media_info.bw_estimations[0].available_recv_bandwidth = 0; |
EXPECT_CALL(*video_media_channel, GetStats(_)) |
.WillOnce(DoAll(SetArgPointee<0>(video_media_info), Return(true))); |
collector_->ClearCachedStatsReport(); |
@@ -1360,14 +1355,19 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidatePairStats) { |
EXPECT_TRUE(report->Get(*expected_pair.transport_id)); |
// Set bandwidth and "GetStats" again. |
- video_media_info.bw_estimations[0].available_send_bandwidth = 888; |
- video_media_info.bw_estimations[0].available_recv_bandwidth = 999; |
+ webrtc::Call::Stats call_stats; |
+ const int kSendBandwidth = 888; |
+ call_stats.send_bandwidth_bps = kSendBandwidth; |
+ const int kRecvBandwidth = 999; |
+ call_stats.recv_bandwidth_bps = kRecvBandwidth; |
+ EXPECT_CALL(test_->session(), GetCallStats()) |
+ .WillRepeatedly(Return(call_stats)); |
EXPECT_CALL(*video_media_channel, GetStats(_)) |
.WillOnce(DoAll(SetArgPointee<0>(video_media_info), Return(true))); |
collector_->ClearCachedStatsReport(); |
report = GetStatsReport(); |
- expected_pair.available_outgoing_bitrate = 888; |
- expected_pair.available_incoming_bitrate = 999; |
+ expected_pair.available_outgoing_bitrate = kSendBandwidth; |
+ expected_pair.available_incoming_bitrate = kRecvBandwidth; |
ASSERT_TRUE(report->Get(expected_pair.id())); |
EXPECT_EQ( |
expected_pair, |