#include "third_party/blink/renderer/modules/webrtc/webrtc_audio_renderer.h"
#include <string>
#include <utility>
#include <vector>
#include "base/cfi_buildflags.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "media/audio/audio_sink_parameters.h"
#include "media/audio/audio_source_parameters.h"
#include "media/base/audio_bus.h"
#include "media/base/audio_capturer_source.h"
#include "media/base/audio_glitch_info.h"
#include "media/base/mock_audio_renderer_sink.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/page/browsing_context_group_info.h"
#include "third_party/blink/public/common/tokens/tokens.h"
#include "third_party/blink/public/mojom/page/prerender_page_param.mojom.h"
#include "third_party/blink/public/mojom/partitioned_popins/partitioned_popin_params.mojom.h"
#include "third_party/blink/public/platform/audio/web_audio_device_source_type.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/web_heap.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_local_frame_client.h"
#include "third_party/blink/public/web/web_view.h"
#include "third_party/blink/renderer/modules/mediastream/media_stream_audio_renderer.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_component.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_descriptor.h"
#include "third_party/blink/renderer/platform/scheduler/public/agent_group_scheduler.h"
#include "third_party/blink/renderer/platform/scheduler/public/main_thread_scheduler.h"
#include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
#include "third_party/blink/renderer/platform/webrtc/webrtc_source.h"
#include "third_party/webrtc/api/media_stream_interface.h"
_;
AnyNumber;
DoAll;
InvokeWithoutArgs;
Return;
SaveArg;
namespace blink {
namespace {
const int kHardwareSampleRate = …;
const int kHardwareBufferSize = …;
const char kDefaultOutputDeviceId[] = …;
const char kOtherOutputDeviceId[] = …;
const char kInvalidOutputDeviceId[] = …;
const media::AudioParameters kAudioParameters(
media::AudioParameters::AUDIO_PCM_LOW_LATENCY,
media::ChannelLayoutConfig::Stereo(),
kHardwareSampleRate,
kHardwareBufferSize);
class MockAudioRendererSource : public blink::WebRtcAudioRendererSource { … };
class AudioDeviceFactoryTestingPlatformSupport : public blink::Platform { … };
}
class WebRtcAudioRendererTest : public testing::Test { … };
TEST_F(WebRtcAudioRendererTest, DISABLED_StopRenderer) { … }
TEST_F(WebRtcAudioRendererTest, DISABLED_MultipleRenderers) { … }
TEST_F(WebRtcAudioRendererTest, DISABLED_VerifySinkParameters) { … }
TEST_F(WebRtcAudioRendererTest, Render) { … }
TEST_F(WebRtcAudioRendererTest, NonDefaultDevice) { … }
TEST_F(WebRtcAudioRendererTest, SwitchOutputDevice) { … }
TEST_F(WebRtcAudioRendererTest, SwitchOutputDeviceInvalidDevice) { … }
TEST_F(WebRtcAudioRendererTest, InitializeWithInvalidDevice) { … }
TEST_F(WebRtcAudioRendererTest, SwitchOutputDeviceStoppedSource) { … }
}