#include "components/paint_preview/browser/paint_preview_client.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/notreached.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "base/unguessable_token.h"
#include "base/version.h"
#include "build/build_config.h"
#include "components/paint_preview/common/capture_result.h"
#include "components/paint_preview/common/mojom/paint_preview_recorder.mojom-forward.h"
#include "components/paint_preview/common/mojom/paint_preview_recorder.mojom-shared.h"
#include "components/paint_preview/common/mojom/paint_preview_recorder.mojom.h"
#include "components/paint_preview/common/proto/paint_preview.pb.h"
#include "components/paint_preview/common/test_utils.h"
#include "components/paint_preview/common/version.h"
#include "components/version_info/version_info.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/test_utils.h"
#include "mojo/public/cpp/base/big_buffer.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
namespace paint_preview {
namespace {
class MockPaintPreviewRecorder : public mojom::PaintPreviewRecorder { … };
mojom::PaintPreviewCaptureParamsPtr ToMojoParams(
PaintPreviewClient::PaintPreviewParams params) { … }
}
class PaintPreviewClientRenderViewHostTest
: public content::RenderViewHostTestHarness,
public testing::WithParamInterface<RecordingPersistence> { … };
TEST_P(PaintPreviewClientRenderViewHostTest, CaptureMainFrameMock) { … }
TEST_P(PaintPreviewClientRenderViewHostTest, CaptureFailureMock) { … }
TEST_P(PaintPreviewClientRenderViewHostTest, RenderFrameDeletedNotCapturing) { … }
TEST_P(PaintPreviewClientRenderViewHostTest, RenderFrameDeletedDuringCapture) { … }
INSTANTIATE_TEST_SUITE_P(…);
}