#include "components/content_capture/browser/content_capture_test_helper.h"
#include "base/run_loop.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content_capture {
FakeContentCaptureSender::FakeContentCaptureSender() = default;
FakeContentCaptureSender::~FakeContentCaptureSender() = default;
void FakeContentCaptureSender::Bind(content::RenderFrameHost* frame) { … }
void FakeContentCaptureSender::DidCaptureContent(
const ContentCaptureData& captured_content,
bool first_data) { … }
void FakeContentCaptureSender::DidUpdateContent(
const ContentCaptureData& captured_content) { … }
void FakeContentCaptureSender::DidRemoveContent(
const std::vector<int64_t>& data) { … }
SessionRemovedTestHelper::SessionRemovedTestHelper() = default;
SessionRemovedTestHelper::~SessionRemovedTestHelper() = default;
void SessionRemovedTestHelper::DidRemoveSession(
const ContentCaptureSession& data) { … }
void SessionRemovedTestHelper::Reset() { … }
ContentCaptureConsumerHelper::ContentCaptureConsumerHelper(
SessionRemovedTestHelper* session_removed_test_helper)
: … { … }
ContentCaptureConsumerHelper::~ContentCaptureConsumerHelper() = default;
void ContentCaptureConsumerHelper::DidCaptureContent(
const ContentCaptureSession& parent_session,
const ContentCaptureFrame& data) { … }
void ContentCaptureConsumerHelper::DidUpdateContent(
const ContentCaptureSession& parent_session,
const ContentCaptureFrame& data) { … }
void ContentCaptureConsumerHelper::DidRemoveContent(
const ContentCaptureSession& session,
const std::vector<int64_t>& ids) { … }
void ContentCaptureConsumerHelper::DidRemoveSession(
const ContentCaptureSession& data) { … }
void ContentCaptureConsumerHelper::DidUpdateTitle(
const ContentCaptureFrame& main_frame) { … }
void ContentCaptureConsumerHelper::DidUpdateFavicon(
const ContentCaptureFrame& main_frame) { … }
bool ContentCaptureConsumerHelper::ShouldCapture(const GURL& url) { … }
void ContentCaptureConsumerHelper::Reset() { … }
ContentCaptureTestHelper::ContentCaptureTestHelper() = default;
ContentCaptureTestHelper::~ContentCaptureTestHelper() = default;
void ContentCaptureTestHelper::CreateProviderAndConsumer(
content::WebContents* web_contents,
SessionRemovedTestHelper* session_removed_helper) { … }
void ContentCaptureTestHelper::InitTestData(const std::u16string& data1,
const std::u16string& data2) { … }
void VerifySession(const ContentCaptureSession& expected,
const ContentCaptureSession& result) { … }
ContentCaptureFrame GetExpectedTestData(const ContentCaptureData& data,
int64_t expected_id) { … }
}