src/media/audio/audio_core/test/api/audio_capturer_test.cc
// Test creation and interface independence of GainControl.
// In a number of tests below, we run the message loop to give the AudioCapturer
// or GainControl binding a chance to disconnect, if an error occurred.
Test creation and interface independence of GainControl.
In a number of tests below, we run the message loop to give the AudioCapturer
or GainControl binding a chance to disconnect, if an error occurred.
Test creation and interface independence of GainControl . In a number of tests below we run the message loop to give the AudioCapturer or GainControl binding a chance to disconnect if an error occurred .
TEST_F(AudioCapturerTest, BindGainControl) {
  audio_capturer_->BindGainControl(gain_control_.NewRequest());
  AddErrorHandler(gain_control_, "AudioCapturer::GainControl");
  fuchsia::media::AudioCapturerPtr audio_capturer_2;
  audio_core_->CreateAudioCapturer(true, audio_capturer_2.NewRequest());
  AddErrorHandler(audio_capturer_2, "AudioCapturer2");
  fuchsia::media::audio::GainControlPtr gain_control_2;
  audio_capturer_2->BindGainControl(gain_control_2.NewRequest());
  AddErrorHandler(gain_control_2, "AudioCapturer::GainControl2");
  audio_capturer_.Unbind();
  gain_control_2.Unbind();
  ExpectDisconnect(gain_control_);
  audio_capturer_2->GetStreamType(AddCallback("GetStreamType"));
  ExpectCallback();
}
TEST_F ( AudioCapturerTest , BindGainControl ) { audio_capturer_ -> BindGainControl ( gain_control_ . NewRequest ( ) ) ; AddErrorHandler ( gain_control_ , " " ) ; fuchsia :: media :: AudioCapturerPtr audio_capturer_2 ; audio_core_ -> CreateAudioCapturer ( true , audio_capturer_2 . NewRequest ( ) ) ; AddErrorHandler ( audio_capturer_2 , " " ) ; fuchsia :: media :: audio :: GainControlPtr gain_control_2 ; audio_capturer_2 -> BindGainControl ( gain_control_2 . NewRequest ( ) ) ; AddErrorHandler ( gain_control_2 , " " ) ; audio_capturer_ . Unbind ( ) ; gain_control_2 . Unbind ( ) ; ExpectDisconnect ( gain_control_ ) ; audio_capturer_2 -> GetStreamType ( AddCallback ( " " ) ) ; ExpectCallback ( ) ; }
Test creation and interface independence of GainControl.
Test creation and interface independence of GainControl .
// Validate AudioCapturers can create GainControl interfaces. // What happens to a child gain_control, when a capturer is unbound? // What happens to a parent capturer, when a gain_control is unbound? // Give audio_capturer_ a chance to disconnect gain_control_ // Give time for other Disconnects to occur, if they must.