chromium/content/browser/media/audio_loopback_stream_broker_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 "content/browser/media/audio_loopback_stream_broker.h"

#include <memory>
#include <utility>

#include "base/memory/raw_ptr.h"
#include "base/sync_socket.h"
#include "base/test/mock_callback.h"
#include "content/public/test/browser_task_environment.h"
#include "media/mojo/mojom/audio_input_stream.mojom.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.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/platform_handle.h"
#include "services/audio/public/cpp/fake_stream_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/abseil-cpp/absl/utility/utility.h"

_;
Test;
Mock;
NiceMock;
StrictMock;
InSequence;

namespace content {

namespace {

const int kRenderProcessId =;
const int kRenderFrameId =;
const uint32_t kShMemCount =;

media::AudioParameters TestParams() {}

class MockSource : public AudioStreamBroker::LoopbackSource {};

MockDeleterCallback;

class MockRendererAudioInputStreamFactoryClient
    : public blink::mojom::RendererAudioInputStreamFactoryClient {};

class MockStreamFactory final : public audio::FakeStreamFactory {};

const bool kMuteSource =;

struct TestEnvironment {};

}  // namespace

TEST(AudioLoopbackStreamBrokerTest, StoresProcessAndFrameId) {}

TEST(AudioLoopbackStreamBrokerTest, StreamCreationSuccess_Propagates) {}

TEST(AudioLoopbackStreamBrokerTest, MutedStreamCreation_Mutes) {}

TEST(AudioLoopbackStreamBrokerTest, SourceGone_CallsDeleter) {}

TEST(AudioLoopbackStreamBrokerTest, StreamCreationFailure_CallsDeleter) {}

TEST(AudioLoopbackStreamBrokerTest,
     RendererFactoryClientDisconnect_CallsDeleter) {}

TEST(AudioLoopbackStreamBrokerTest, ObserverDisconnect_CallsDeleter) {}

TEST(AudioLoopbackStreamBrokerTest,
     FactoryDisconnectDuringConstruction_CallsDeleter) {}

}  // namespace content