#include "services/audio/public/cpp/audio_system_to_service_adapter.h"
#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "media/audio/audio_system_test_util.h"
#include "media/audio/test_audio_thread.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "services/audio/in_process_audio_manager_accessor.h"
#include "services/audio/system_info.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
Exactly;
MockFunction;
NiceMock;
namespace audio {
class AudioSystemToServiceAdapterTestBase : public testing::Test { … };
class AudioSystemToServiceAdapterConnectionLossTest
: public AudioSystemToServiceAdapterTestBase { … };
TEST_F(AudioSystemToServiceAdapterConnectionLossTest,
GetAssociatedOutputDeviceIDFullConnectionTest) { … }
TEST_F(AudioSystemToServiceAdapterConnectionLossTest,
GetInputStreamParameters) { … }
TEST_F(AudioSystemToServiceAdapterConnectionLossTest,
GetOutputStreamParameters) { … }
TEST_F(AudioSystemToServiceAdapterConnectionLossTest, HasInputDevices) { … }
TEST_F(AudioSystemToServiceAdapterConnectionLossTest, HasOutputDevices) { … }
TEST_F(AudioSystemToServiceAdapterConnectionLossTest,
GetInputDeviceDescriptions) { … }
TEST_F(AudioSystemToServiceAdapterConnectionLossTest,
GetOutputDeviceDescriptions) { … }
TEST_F(AudioSystemToServiceAdapterConnectionLossTest, GetInputDeviceInfo) { … }
namespace {
static constexpr auto kResponseDelay = …;
static constexpr char kSomeDeviceId[] = …;
static constexpr char kValidReplyId[] = …;
}
class AudioSystemToServiceAdapterDisconnectTest : public testing::Test { … };
TEST_F(AudioSystemToServiceAdapterDisconnectTest,
ResponseDelayIsShorterThanDisconnectTimeout) { … }
TEST_F(AudioSystemToServiceAdapterDisconnectTest,
ResponseDelayIsLongerThanDisconnectTimeout) { … }
TEST_F(AudioSystemToServiceAdapterDisconnectTest,
DisconnectTimeoutIsResetOnSecondRequest) { … }
TEST_F(AudioSystemToServiceAdapterDisconnectTest,
DoesNotDisconnectIfNoTimeout) { … }
}
namespace media {
AudioSystemToServiceAdapterTestVariations;
INSTANTIATE_TYPED_TEST_SUITE_P(…);
}