chromium/third_party/blink/renderer/modules/mediastream/track_audio_renderer_test.cc

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

#include "third_party/blink/renderer/modules/mediastream/track_audio_renderer.h"

#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/threading/thread.h"
#include "base/threading/thread_checker.h"
#include "base/unguessable_token.h"
#include "media/base/audio_glitch_info.h"
#include "media/base/channel_layout.h"
#include "media/base/fake_audio_renderer_sink.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/renderer/core/testing/dummy_page_holder.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_audio_source.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_audio_track.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_component_impl.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_source.h"
#include "third_party/blink/renderer/platform/testing/io_task_runner_testing_platform_support.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace blink {

namespace {

constexpr int kSampleRate =;
constexpr int kFrames =;
constexpr int kAltFrames =;
constexpr int kChannels =;
constexpr int kAltChannels =;
const media::AudioParameters kDefaultFormat(
    media::AudioParameters::Format::AUDIO_PCM_LINEAR,
    media::ChannelLayoutConfig::Stereo(),
    kSampleRate,
    kFrames);

SinkState;

}  // namespace

// Test Platform implementation to inject an IO task runner.
class AudioRendererSinkTestingPlatformSupport
    : public IOTaskRunnerTestingPlatformSupport {};

class FakeMediaStreamAudioSource final : public MediaStreamAudioSource {};

class TrackAudioRendererTest : public testing::TestWithParam<bool> {};

TEST_P(TrackAudioRendererTest, SingleCapture) {}

TEST_P(TrackAudioRendererTest, Integration_IdenticalData) {}

TEST_P(TrackAudioRendererTest, Integration_VariableFrames) {}

TEST_P(TrackAudioRendererTest, Integration_VariableFrames_RepeatedBuffers) {}

TEST_P(TrackAudioRendererTest, Integration_VariableChannels) {}

TEST_P(TrackAudioRendererTest, Integration_VariableChannels_RepeatedBuffers) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace blink