#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_input.h"
#include <stddef.h>
#include <memory>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "media/base/audio_latency.h"
#include "media/base/fake_audio_render_callback.h"
#include "media/base/mock_audio_renderer_sink.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_mixer.h"
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_pool.h"
_;
namespace blink {
constexpr int kSampleRate = …;
constexpr int kBufferSize = …;
constexpr media::ChannelLayout kChannelLayout = …;
constexpr char kDefaultDeviceId[] = …;
constexpr char kAnotherDeviceId[] = …;
constexpr char kUnauthorizedDeviceId[] = …;
constexpr char kNonexistentDeviceId[] = …;
class AudioRendererMixerInputTest : public testing::Test,
public AudioRendererMixerPool { … };
TEST_F(AudioRendererMixerInputTest, GetSetVolume) { … }
TEST_F(AudioRendererMixerInputTest, StartPlayPauseStopPlaying) { … }
TEST_F(AudioRendererMixerInputTest, StopBeforeInitializeOrStart) { … }
TEST_F(AudioRendererMixerInputTest, StartAfterStop) { … }
TEST_F(AudioRendererMixerInputTest, InitializeAfterStop) { … }
TEST_F(AudioRendererMixerInputTest, SwitchOutputDevice) { … }
TEST_F(AudioRendererMixerInputTest, SwitchOutputDeviceToSameDevice) { … }
TEST_F(AudioRendererMixerInputTest, SwitchOutputDeviceToAnotherDevice) { … }
TEST_F(AudioRendererMixerInputTest, SwitchOutputDeviceToNonexistentDevice) { … }
TEST_F(AudioRendererMixerInputTest, SwitchOutputDeviceToUnauthorizedDevice) { … }
TEST_F(AudioRendererMixerInputTest, SwitchOutputDeviceBeforeStart) { … }
TEST_F(AudioRendererMixerInputTest, SwitchOutputDeviceWithoutStart) { … }
TEST_F(AudioRendererMixerInputTest, SwitchOutputDeviceAfterStopBeforeRestart) { … }
TEST_F(AudioRendererMixerInputTest, SwitchOutputDeviceBeforeInitialize) { … }
TEST_F(AudioRendererMixerInputTest, SwitchOutputDeviceBeforeGODIA) { … }
TEST_F(AudioRendererMixerInputTest, SwitchOutputDeviceDuringGODIA) { … }
TEST_F(AudioRendererMixerInputTest, GODIADuringSwitchOutputDevice) { … }
TEST_F(AudioRendererMixerInputTest, GODIADuringSwitchOutputDeviceWhichFails) { … }
TEST_F(AudioRendererMixerInputTest, SwitchOutputDeviceEmptyDeviceId) { … }
}