#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, "") { … }
}
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_P(SubCaptureTargetIdWebContentsHelperTest, MaxIdsPerWebContentsObserved) { … }
TEST_P(SubCaptureTargetIdWebContentsHelperTest, MaxIdsPerTypeObserved) { … }
TEST_P(SubCaptureTargetIdWebContentsHelperTest,
CrossDocumentNavigationClearsIdAssociation) { … }
TEST_P(SubCaptureTargetIdWebContentsHelperTest,
InDocumentNavigationDoesNotClearIdAssociation) { … }
}