#include "third_party/blink/renderer/platform/mediastream/audio_service_audio_processor_proxy.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/task/thread_pool.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "media/base/audio_processor_controls.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webrtc/api/media_stream_interface.h"
_;
StrictMock;
namespace blink {
namespace {
void VerifyStats(const media::AudioProcessingStats& expected,
scoped_refptr<AudioServiceAudioProcessorProxy> proxy) { … }
void VerifyStatsFromAnotherThread(
const media::AudioProcessingStats& expected,
scoped_refptr<AudioServiceAudioProcessorProxy> proxy) { … }
void MaybeSetNumChannelsOnAnotherThread(
scoped_refptr<AudioServiceAudioProcessorProxy> proxy,
uint32_t num_channels) { … }
}
class MockAudioProcessorControls : public media::AudioProcessorControls { … };
class AudioServiceAudioProcessorProxyTest : public testing::Test { … };
TEST_F(AudioServiceAudioProcessorProxyTest, SafeIfNoControls) { … }
TEST_F(AudioServiceAudioProcessorProxyTest, StopDetachesFromControls) { … }
TEST_F(AudioServiceAudioProcessorProxyTest, StatsUpdatedOnTimer) { … }
TEST_F(AudioServiceAudioProcessorProxyTest, SetNumChannelsIfIncreases) { … }
TEST_F(AudioServiceAudioProcessorProxyTest,
DoesNotSetNumChannelsIfDoesNotChange) { … }
TEST_F(AudioServiceAudioProcessorProxyTest, DoesNotSetNumChannelsIfDecreases) { … }
}