src/media/audio/audio_core/test/api/audio_capturer_test.cc
// DiscardAllPackets should fail, if async capture is active
DiscardAllPackets should fail, if async capture is active
DiscardAllPackets should fail if async capture is active
TEST_F(AudioCapturerTest, DiscardAll_DuringAsyncCaptureShouldDisconnect) {
  SetFormat();
  SetUpPayloadBuffer();
  audio_capturer_.events().OnPacketProduced = AddCallback("OnPacketProduced");
  audio_capturer_->StartAsyncCapture(1600);
  ExpectCallback();
  audio_capturer_->DiscardAllPackets(AddUnexpectedCallback("DiscardAllPackets"));
  ExpectDisconnect(audio_capturer_);
}
TEST_F ( AudioCapturerTest , DiscardAll_DuringAsyncCaptureShouldDisconnect ) { SetFormat ( ) ; SetUpPayloadBuffer ( ) ; audio_capturer_ . events ( ) . OnPacketProduced = AddCallback ( " " ) ; audio_capturer_ -> StartAsyncCapture ( 1600 ) ; ExpectCallback ( ) ; audio_capturer_ -> DiscardAllPackets ( AddUnexpectedCallback ( " " ) ) ; ExpectDisconnect ( audio_capturer_ ) ; }
DiscardAllPackets should fail, if async capture is active
DiscardAllPackets should fail if async capture is active