chromium/services/audio/input_stream_unittest.cc

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

#include "services/audio/input_stream.h"

#include <memory>
#include <string>
#include <utility>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/read_only_shared_memory_region.h"
#include "base/test/task_environment.h"
#include "media/audio/audio_io.h"
#include "media/audio/mock_audio_manager.h"
#include "media/audio/test_audio_thread.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/system/functions.h"
#include "services/audio/stream_factory.h"
#include "services/audio/test/mock_log.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
NiceMock;
NotNull;
Return;
StrictMock;

namespace audio {

namespace {

const uint32_t kDefaultSharedMemoryCount =;
const bool kDoEnableAGC =;
const bool kDoNotEnableAGC =;
const bool kValidStream =;
const bool kInvalidStream =;
const bool kMuted =;
const bool kNotMuted =;
const char* kDefaultDeviceId =;

class MockStreamClient : public media::mojom::AudioInputStreamClient {};

class MockStreamObserver : public media::mojom::AudioInputStreamObserver {};

class MockStream : public media::AudioInputStream {};

}  // namespace

class AudioServiceInputStreamTest : public testing::Test {};

TEST_F(AudioServiceInputStreamTest, ConstructDestruct) {}

TEST_F(AudioServiceInputStreamTest, ConstructDestructNullptrLog) {}

TEST_F(AudioServiceInputStreamTest, ConstructDestructNullptrObserver) {}

TEST_F(AudioServiceInputStreamTest,
       ConstructStreamAndCloseClientBinding_DestructsStream) {}

TEST_F(AudioServiceInputStreamTest,
       ConstructStreamAndCloseObserverBinding_DestructsStream) {}

TEST_F(AudioServiceInputStreamTest,
       ConstructStreamAndResetStreamPtr_DestructsStream) {}

TEST_F(AudioServiceInputStreamTest, Record) {}

TEST_F(AudioServiceInputStreamTest, SetVolume) {}

TEST_F(AudioServiceInputStreamTest, SetNegativeVolume_BadMessage) {}

TEST_F(AudioServiceInputStreamTest, SetVolumeGreaterThanOne_BadMessage) {}

TEST_F(AudioServiceInputStreamTest, CreateStreamWithAGCEnable_PropagateAGC) {}

TEST_F(AudioServiceInputStreamTest,
       CreateInitiallyMutedStream_PropagateInitiallyMuted) {}

TEST_F(AudioServiceInputStreamTest,
       ConstructWithStreamCreationFailure_SignalsError) {}

}  // namespace audio