#include "services/audio/device_listener_output_stream.h"
#include <optional>
#include "base/memory/raw_ptr.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/task_environment.h"
#include "media/audio/fake_audio_log_factory.h"
#include "media/audio/fake_audio_manager.h"
#include "media/audio/mock_audio_source_callback.h"
#include "media/audio/test_audio_thread.h"
#include "media/base/audio_parameters.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
InSequence;
AudioBus;
AudioManager;
AudioOutputStream;
MockAudioSourceCallback;
RunOnceClosure;
namespace audio {
namespace {
class MockAudioOutputStream : public AudioOutputStream { … };
class FakeAudioManagerForDeviceChange : public media::FakeAudioManager { … };
class DeviceListenerOutputStreamTest : public ::testing::Test { … };
TEST_F(DeviceListenerOutputStreamTest, DelegatesCallsToWrappedStream) { … }
TEST_F(DeviceListenerOutputStreamTest, DeviceChangeNotification) { … }
TEST_F(DeviceListenerOutputStreamTest, DeviceChangeError) { … }
TEST_F(DeviceListenerOutputStreamTest, UnknownError) { … }
TEST_F(DeviceListenerOutputStreamTest, ErrorThenDeviceChange) { … }
TEST_F(DeviceListenerOutputStreamTest, ErrorThenStop) { … }
}
}