#include "components/content_capture/browser/content_capture_receiver.h"
#include "base/json/json_reader.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_mock_time_task_runner.h"
#include "build/build_config.h"
#include "components/content_capture/browser/content_capture_test_helper.h"
#include "content/public/browser/back_forward_cache.h"
#include "content/public/common/content_features.h"
#include "content/public/test/back_forward_cache_util.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/test_utils.h"
#include "third_party/blink/public/mojom/favicon/favicon_url.mojom.h"
#include "ui/gfx/geometry/size.h"
namespace content_capture {
namespace {
static constexpr char16_t kMainFrameUrl[] = …;
static constexpr char16_t kMainFrameUrl2[] = …;
static constexpr char16_t kChildFrameUrl[] = …;
static constexpr char16_t kMainFrameSameDocument[] = …;
}
class ContentCaptureReceiverTest : public content::RenderViewHostTestHarness,
public ::testing::WithParamInterface<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(ContentCaptureReceiverTest, DidCaptureContent) { … }
TEST_P(ContentCaptureReceiverTest, MultipleConsumers) { … }
TEST_P(ContentCaptureReceiverTest, DidCaptureContentWithUpdate) { … }
TEST_P(ContentCaptureReceiverTest, DidUpdateContent) { … }
TEST_P(ContentCaptureReceiverTest, DidRemoveSession) { … }
TEST_P(ContentCaptureReceiverTest, DidRemoveContent) { … }
TEST_P(ContentCaptureReceiverTest, ChildFrameDidCaptureContent) { … }
TEST_P(ContentCaptureReceiverTest, RenderFrameHostGone) { … }
TEST_P(ContentCaptureReceiverTest, TitleUpdateTaskDelay) { … }
TEST_P(ContentCaptureReceiverTest, ChildFrameCaptureContentFirst) { … }
TEST_P(ContentCaptureReceiverTest, SameDocumentSameSession) { … }
TEST_P(ContentCaptureReceiverTest, ConvertFaviconURLToJSON) { … }
class ContentCaptureReceiverMultipleFrameTest
: public content::RenderViewHostTestHarness { … };
TEST_F(ContentCaptureReceiverMultipleFrameTest,
ReceiverCreatedForExistingFrame) { … }
}