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

Unified Diff: audio/audio_state_unittest.cc

Issue 3019513002: Remove the VoiceEngineObserver callback interface. (Closed)
Patch Set: rebase + build error 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
« no previous file with comments | « audio/audio_state.cc ('k') | media/engine/fakewebrtcvoiceengine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: audio/audio_state_unittest.cc
diff --git a/audio/audio_state_unittest.cc b/audio/audio_state_unittest.cc
index 26fa31c4aa05eb5c9ac8a486548653aa03baa58f..86be2458e5f99b53a2674969ec9c1da3479fa60a 100644
--- a/audio/audio_state_unittest.cc
+++ b/audio/audio_state_unittest.cc
@@ -26,10 +26,6 @@ const int kBytesPerSample = 2;
struct ConfigHelper {
ConfigHelper() : audio_mixer(AudioMixerImpl::Create()) {
- EXPECT_CALL(mock_voice_engine, RegisterVoiceEngineObserver(testing::_))
- .WillOnce(testing::Return(0));
- EXPECT_CALL(mock_voice_engine, DeRegisterVoiceEngineObserver())
- .WillOnce(testing::Return(0));
EXPECT_CALL(mock_voice_engine, audio_device_module())
.Times(testing::AtLeast(1));
EXPECT_CALL(mock_voice_engine, audio_transport())
@@ -101,28 +97,6 @@ TEST(AudioStateTest, GetVoiceEngine) {
EXPECT_EQ(audio_state->voice_engine(), &helper.voice_engine());
}
-TEST(AudioStateTest, TypingNoiseDetected) {
- ConfigHelper helper;
- std::unique_ptr<internal::AudioState> audio_state(
- new internal::AudioState(helper.config()));
- VoiceEngineObserver* voe_observer =
- static_cast<VoiceEngineObserver*>(audio_state.get());
- EXPECT_FALSE(audio_state->typing_noise_detected());
-
- voe_observer->CallbackOnError(-1, VE_NOT_INITED);
- EXPECT_FALSE(audio_state->typing_noise_detected());
-
- voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_WARNING);
- EXPECT_TRUE(audio_state->typing_noise_detected());
- voe_observer->CallbackOnError(-1, VE_NOT_INITED);
- EXPECT_TRUE(audio_state->typing_noise_detected());
-
- voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_OFF_WARNING);
- EXPECT_FALSE(audio_state->typing_noise_detected());
- voe_observer->CallbackOnError(-1, VE_NOT_INITED);
- EXPECT_FALSE(audio_state->typing_noise_detected());
-}
-
// Test that RecordedDataIsAvailable calls get to the original transport.
TEST(AudioStateAudioPathTest, RecordedAudioArrivesAtOriginalTransport) {
ConfigHelper helper;
« no previous file with comments | « audio/audio_state.cc ('k') | media/engine/fakewebrtcvoiceengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698