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

Unified Diff: webrtc/media/engine/webrtcvoiceengine_unittest.cc

Issue 3011623002: Add new ANA stats to GetStats() to count the number of actions taken by each controller. (Closed)
Patch Set: Addressed review comments. Created 3 years, 3 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
Index: webrtc/media/engine/webrtcvoiceengine_unittest.cc
diff --git a/webrtc/media/engine/webrtcvoiceengine_unittest.cc b/webrtc/media/engine/webrtcvoiceengine_unittest.cc
index 5ccd7d6bb62fe67238632028c182c8083d2daefd..6b54db386fc7161a091c522bdef4a54bd5c0bf4b 100644
--- a/webrtc/media/engine/webrtcvoiceengine_unittest.cc
+++ b/webrtc/media/engine/webrtcvoiceengine_unittest.cc
@@ -546,6 +546,11 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
stats.echo_return_loss_enhancement = 1234;
stats.residual_echo_likelihood = 0.432f;
stats.residual_echo_likelihood_recent_max = 0.6f;
+ stats.ana_bitrate_action_counter = rtc::Optional<int>(321);
+ stats.ana_channel_action_counter = rtc::Optional<int>(432);
+ stats.ana_dtx_action_counter = rtc::Optional<int>(543);
+ stats.ana_fec_action_counter = rtc::Optional<int>(654);
+ stats.ana_frame_length_action_counter = rtc::Optional<int>(765);
stats.typing_noise_detected = true;
return stats;
}
@@ -577,6 +582,14 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
EXPECT_EQ(info.residual_echo_likelihood, stats.residual_echo_likelihood);
EXPECT_EQ(info.residual_echo_likelihood_recent_max,
stats.residual_echo_likelihood_recent_max);
+ EXPECT_EQ(info.ana_bitrate_action_counter,
+ stats.ana_bitrate_action_counter);
+ EXPECT_EQ(info.ana_channel_action_counter,
+ stats.ana_channel_action_counter);
+ EXPECT_EQ(info.ana_dtx_action_counter, stats.ana_dtx_action_counter);
+ EXPECT_EQ(info.ana_fec_action_counter, stats.ana_fec_action_counter);
+ EXPECT_EQ(info.ana_frame_length_action_counter,
+ stats.ana_frame_length_action_counter);
EXPECT_EQ(info.typing_noise_detected,
stats.typing_noise_detected && is_sending);
}

Powered by Google App Engine
This is Rietveld 408576698