chromium/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_audio_source_test.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/modules/breakout_box/pushable_media_stream_audio_source.h"

#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/mediastream/media_stream.mojom-blink.h"
#include "third_party/blink/public/platform/modules/mediastream/web_media_stream_audio_sink.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/public/web/web_heap.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/cross_thread_functional.h"

namespace blink {

namespace {

class FakeMediaStreamAudioSink : public WebMediaStreamAudioSink {};

}  // namespace

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

TEST_P(PushableMediaStreamAudioSourceTest, ConnectAndStop) {}

TEST_P(PushableMediaStreamAudioSourceTest, FramesPropagateToSink) {}

TEST_P(PushableMediaStreamAudioSourceTest, ConvertsFormatInternally) {}

// Tests with audio delivered on a dedicated audio task (GetParam() == true) and
// using the calling task (GetParam() == false).
INSTANTIATE_TEST_SUITE_P();

}  // namespace blink