#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "build/chromeos_buildflags.h"
#include "media/capture/mojom/image_capture_types.h"
#include "media/capture/video/mock_device.h"
#include "media/capture/video/mock_device_factory.h"
#include "media/capture/video/video_capture_device.h"
#include "media/capture/video/video_capture_system_impl.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/video_capture/device_factory_impl.h"
#include "services/video_capture/device_media_to_mojo_adapter.h"
#include "services/video_capture/public/cpp/mock_video_frame_handler.h"
#include "services/video_capture/public/mojom/video_capture_service.mojom.h"
#include "services/video_capture/public/mojom/video_frame_handler.mojom.h"
#include "services/video_capture/public/mojom/video_source.mojom.h"
#include "services/video_capture/video_source_provider_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
Invoke;
InvokeWithoutArgs;
Mock;
SaveArg;
namespace video_capture {
class MockVideoCaptureDeviceSharedAccessTest : public ::testing::Test { … };
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
TwoClientsCreatePushSubscriptionWithSameSettings) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
TwoClientsCreatePushSubscriptionWithDifferentSettings) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
SecondClientForcesReopenWithDifferentSettings) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
SecondClientsForcesReopenWithSameSettings) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
InternalDeviceRestartIsTransparentToExistingSubscribers) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
CreatingSubscriptionFailsWhenCreatingDeviceFails) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
NoFramesArePushedUntilSubscriptionIsActivated) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
DiscardingLastSubscriptionStopsTheDevice) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
DiscardingLastVideoSourceRemoteStopsTheDevice) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
NoMoreFramesArriveAfterClosingSubscription) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest, SuspendAndResume) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest, SuspendAndResumeSingleClient) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
CreateNewSubscriptionAfterClosingExistingOneUsesNewSettings) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
TakePhotoUsingOnPushSubscriptionWithDifferentSettings) { … }
TEST_F(MockVideoCaptureDeviceSharedAccessTest,
TakePhotoUsingOnPushSubscriptionWithSameSetting) { … }
}