#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/capture/video/fake_video_capture_device.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <utility>
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/ranges/algorithm.h"
#include "base/run_loop.h"
#include "base/task/bind_post_task.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/test/test_timeouts.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
#include "media/base/media_switches.h"
#include "media/capture/video/fake_video_capture_device_factory.h"
#include "media/capture/video/mock_video_capture_device_client.h"
#include "media/capture/video/video_capture_device.h"
#include "media/capture/video_capture_types.h"
#include "media/video/fake_gpu_memory_buffer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
Combine;
Values;
namespace media {
bool operator==(const FakePhotoDeviceConfig& lhs,
const FakePhotoDeviceConfig& rhs) { … }
namespace {
class ImageCaptureClient : public base::RefCounted<ImageCaptureClient> { … };
}
class FakeVideoCaptureDeviceTestBase : public ::testing::Test { … };
class FakeVideoCaptureDeviceTest
: public FakeVideoCaptureDeviceTestBase,
public ::testing::WithParamInterface<
::testing::tuple<VideoPixelFormat,
FakeVideoCaptureDevice::DeliveryMode,
float>> { … };
TEST_P(FakeVideoCaptureDeviceTest, CaptureUsing) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(FakeVideoCaptureDeviceTest, GetDeviceSupportedFormats) { … }
TEST_F(FakeVideoCaptureDeviceTest, ErrorDeviceReportsError) { … }
TEST_F(FakeVideoCaptureDeviceTest, GetAndSetCapabilities) { … }
TEST_F(FakeVideoCaptureDeviceTest, TakePhoto) { … }
struct CommandLineTestData { … };
class FakeVideoCaptureDeviceFactoryTest
: public FakeVideoCaptureDeviceTestBase,
public ::testing::WithParamInterface<CommandLineTestData> { … };
TEST_F(FakeVideoCaptureDeviceFactoryTest, DeviceWithNoSupportedFormats) { … }
TEST_P(FakeVideoCaptureDeviceFactoryTest,
FrameRateAndDeviceCountAndDisplayMediaType) { … }
INSTANTIATE_TEST_SUITE_P(…);
}