chromium/media/audio/audio_output_device_unittest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/audio/audio_output_device.h"

#include <stdint.h>

#include <utility>
#include <vector>

#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/shared_memory_mapping.h"
#include "base/memory/unsafe_shared_memory_region.h"
#include "base/sync_socket.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/task_runner.h"
#include "base/test/bind.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

CancelableSyncSocket;
UnsafeSharedMemoryRegion;
WritableSharedMemoryMapping;
SyncSocket;
_;
DoAll;
Invoke;
Return;
WithArg;
StrictMock;
NiceMock;
NotNull;
Mock;

namespace media {

namespace {

constexpr char kDefaultDeviceId[] =;
constexpr char kNonDefaultDeviceId[] =;
constexpr char kUnauthorizedDeviceId[] =;
constexpr base::TimeDelta kAuthTimeout =;

class MockRenderCallback : public AudioRendererSink::RenderCallback {};

class MockAudioOutputIPC : public AudioOutputIPC {};

}  // namespace.

class AudioOutputDeviceTest : public testing::Test {};

AudioOutputDeviceTest::AudioOutputDeviceTest()
    :{}

AudioOutputDeviceTest::~AudioOutputDeviceTest() = default;

void AudioOutputDeviceTest::CreateDevice(const std::string& device_id,
                                         base::TimeDelta timeout) {}

void AudioOutputDeviceTest::SetDevice(const std::string& device_id) {}

void AudioOutputDeviceTest::ReceiveAuthorization(OutputDeviceStatus status) {}

void AudioOutputDeviceTest::StartAudioDevice() {}

void AudioOutputDeviceTest::CallOnStreamCreated() {}

void AudioOutputDeviceTest::StopAudioDevice() {}

void AudioOutputDeviceTest::FlushAudioDevice() {}

void AudioOutputDeviceTest::Render() {}

void AudioOutputDeviceTest::CloseBrowserSocket() {}

TEST_F(AudioOutputDeviceTest, Initialize) {}

// Calls Start() followed by an immediate Stop() and check for the basic message
// filter messages being sent in that case.
TEST_F(AudioOutputDeviceTest, StartStop) {}

// AudioOutputDevice supports multiple start/stop sequences.
TEST_F(AudioOutputDeviceTest, StartStopStartStop) {}

// Simulate receiving OnStreamCreated() prior to processing ShutDownOnIOThread()
// on the IO loop.
TEST_F(AudioOutputDeviceTest, StopBeforeRender) {}

TEST_F(AudioOutputDeviceTest, NoErrorForNormalShutdown) {}

TEST_F(AudioOutputDeviceTest, ErrorFiredForSocketClose) {}

// Multiple start/stop with nondefault device
TEST_F(AudioOutputDeviceTest, NonDefaultStartStopStartStop) {}

TEST_F(AudioOutputDeviceTest, UnauthorizedDevice) {}

TEST_F(AudioOutputDeviceTest,
       StartUnauthorizedDeviceAndStopBeforeErrorFires_NoError) {}

TEST_F(AudioOutputDeviceTest, AuthorizationFailsBeforeInitialize_NoError) {}

TEST_F(AudioOutputDeviceTest, AuthorizationTimedOut) {}

TEST_F(AudioOutputDeviceTest, GetOutputDeviceInfoAsync_Error) {}

TEST_F(AudioOutputDeviceTest, GetOutputDeviceInfoAsync_Okay) {}

TEST_F(AudioOutputDeviceTest, StreamIsFlushed) {}

}  // namespace media.