chromium/media/capture/video/linux/v4l2_capture_delegate_gpu_helper_unittest.cc

// Copyright 2023 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/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif
#include "media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h"

#include "base/command_line.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "media/base/test_data_util.h"
#include "media/capture/video/mock_gpu_memory_buffer_manager.h"
#include "media/video/fake_gpu_memory_buffer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
A;
AtLeast;
AtMost;
Invoke;
InvokeWithoutArgs;

namespace media {

namespace {

constexpr char kMjpegFrameFile[] =;
class MockV4l2GpuClient : public VideoCaptureDevice::Client {};

class MockCaptureHandleProvider
    : public VideoCaptureDevice::Client::Buffer::HandleProvider {};

class InvalidGpuMemoryBufferSupport : public gpu::GpuMemoryBufferSupport {};
}  // namespace

class V4l2CaptureDelegateGpuHelperTest
    : public ::testing::TestWithParam<VideoCaptureFormat> {};

TEST_F(V4l2CaptureDelegateGpuHelperTest, FailureAsInvalidClient) {}

TEST_F(V4l2CaptureDelegateGpuHelperTest,
       FailureAsInvalidMJPEGCaptureSampleData) {}

TEST_F(V4l2CaptureDelegateGpuHelperTest, FailureAsReserveOutputBufferErr) {}

TEST_F(V4l2CaptureDelegateGpuHelperTest,
       FailureAsInvalidCreateGpuMemoryBuffer) {}

TEST_F(V4l2CaptureDelegateGpuHelperTest, SuccessRotationIsNotZero) {}

TEST_P(V4l2CaptureDelegateGpuHelperTest, SuccessConvertWithCaptureParam) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace media