chromium/content/browser/renderer_host/media/sub_capture_target_id_web_contents_helper_unittest.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/media/capture/sub_capture_target_id_web_contents_helper.h"

#include <array>
#include <map>
#include <memory>
#include <string>
#include <vector>

#include "base/uuid.h"
#include "build/build_config.h"
#include "content/test/test_render_view_host.h"
#include "content/test/test_web_contents.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gtest/include/gtest/gtest.h"

#if BUILDFLAG(IS_ANDROID)
#error Region Capture not supported on Android.
#endif

namespace content {

namespace {

Values;
WithParamInterface;

Type;

constexpr size_t kMaxIdsPerWebContents =;

MATCHER(IsEmptyId, "") {}

MATCHER(IsValidId, "") {}

}  // namespace

class SubCaptureTargetIdWebContentsHelperTest
    : public RenderViewHostImplTestHarness,
      public WithParamInterface<Type> {};

INSTANTIATE_TEST_SUITE_P();

TEST_P(SubCaptureTargetIdWebContentsHelperTest,
       IsAssociatedWithReturnsFalseForUnknownId) {}

TEST_P(SubCaptureTargetIdWebContentsHelperTest, ProduceIdReturnsId) {}

TEST_P(SubCaptureTargetIdWebContentsHelperTest,
       IsAssociatedWithReturnsTrueForKnownIdIfCorrectWebContents) {}

TEST_P(SubCaptureTargetIdWebContentsHelperTest, IsAssociatedWithObservesType) {}

// Test that the limit of `kMaxIdsPerWebContents` is applied independently
// for different WebContents.
TEST_P(SubCaptureTargetIdWebContentsHelperTest, MaxIdsPerWebContentsObserved) {}

// Test that the limit of `kMaxIdsPerWebContents` is applied independently
// for different types (CropTarget, RestrictionTarget).
TEST_P(SubCaptureTargetIdWebContentsHelperTest, MaxIdsPerTypeObserved) {}

TEST_P(SubCaptureTargetIdWebContentsHelperTest,
       CrossDocumentNavigationClearsIdAssociation) {}

TEST_P(SubCaptureTargetIdWebContentsHelperTest,
       InDocumentNavigationDoesNotClearIdAssociation) {}

}  // namespace content