chromium/third_party/blink/renderer/platform/exported/video_capture/web_video_capture_impl_manager_test.cc

// Copyright 2014 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/public/platform/modules/video_capture/web_video_capture_impl_manager.h"

#include <array>
#include <utility>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/task/bind_post_task.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/task_environment.h"
#include "base/token.h"
#include "media/capture/mojom/video_capture.mojom-blink.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/renderer/platform/video_capture/gpu_memory_buffer_test_support.h"
#include "third_party/blink/renderer/platform/video_capture/video_capture_impl.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_base.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"

RunOnceClosure;
_;
DoAll;
InSequence;
SaveArg;

namespace blink {

namespace {

// Callback interface to be implemented by VideoCaptureImplManagerTest.
// MockVideoCaptureImpl intercepts IPC messages and calls these methods to
// simulate what the VideoCaptureHost would do.
class PauseResumeCallback {};

class MockVideoCaptureImpl : public VideoCaptureImpl,
                             public media::mojom::blink::VideoCaptureHost {};

class MockVideoCaptureImplManager : public WebVideoCaptureImplManager {};

}  // namespace

class VideoCaptureImplManagerTest : public ::testing::Test,
                                    public PauseResumeCallback {};

// Multiple clients with the same session id. There is only one
// media::VideoCapture object.
TEST_F(VideoCaptureImplManagerTest, MultipleClients) {}

TEST_F(VideoCaptureImplManagerTest, NoLeak) {}

TEST_F(VideoCaptureImplManagerTest, SuspendAndResumeSessions) {}

}  // namespace blink