#include "pdf/pdf_ink_module.h"
#include <set>
#include <string_view>
#include <vector>
#include "base/check_op.h"
#include "base/containers/contains.h"
#include "base/containers/span.h"
#include "base/containers/to_vector.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/values.h"
#include "pdf/ink/ink_affine_transform.h"
#include "pdf/ink/ink_brush.h"
#include "pdf/pdf_features.h"
#include "pdf/pdf_ink_brush.h"
#include "pdf/pdf_ink_transform.h"
#include "pdf/test/mouse_event_builder.h"
#include "pdf/test/pdf_ink_test_helpers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/input/web_mouse_event.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/geometry/vector2d_f.h"
_;
ElementsAre;
ElementsAreArray;
InSequence;
Pair;
SizeIs;
namespace chrome_pdf {
namespace {
constexpr gfx::RectF kVerticalLayout2Pages[] = …;
constexpr gfx::PointF kTwoPageVerticalLayoutPointOutsidePages(10.0f, 0.0f);
constexpr gfx::PointF kTwoPageVerticalLayoutPoint1InsidePage0(10.0f, 10.0f);
constexpr gfx::PointF kTwoPageVerticalLayoutPoint2InsidePage0(15.0f, 15.0f);
constexpr gfx::PointF kTwoPageVerticalLayoutPoint3InsidePage0(20.0f, 15.0f);
constexpr gfx::PointF kTwoPageVerticalLayoutPoint1InsidePage1(10.0f, 75.0f);
constexpr gfx::PointF kTwoPageVerticalLayoutPoint2InsidePage1(15.0f, 80.0f);
constexpr gfx::PointF kTwoPageVerticalLayoutPoint3InsidePage1(20.0f, 80.0f);
constexpr gfx::PointF kTwoPageVerticalLayoutPageExitAndReentryPoints[] = …;
constexpr gfx::PointF kTwoPageVerticalLayoutPageExitAndReentrySegment1[] = …;
constexpr gfx::PointF kTwoPageVerticalLayoutPageExitAndReentrySegment2[] = …;
class FakeClient : public PdfInkModule::Client { … };
class PdfInkModuleTest : public testing::Test { … };
TEST_F(PdfInkModuleTest, UnknownMessage) { … }
TEST_F(PdfInkModuleTest, HandleSetAnnotationBrushMessageEraser) { … }
TEST_F(PdfInkModuleTest, HandleSetAnnotationBrushMessagePen) { … }
TEST_F(PdfInkModuleTest, HandleSetAnnotationBrushMessageHighlighter) { … }
TEST_F(PdfInkModuleTest, HandleSetAnnotationBrushMessageColorZero) { … }
TEST_F(PdfInkModuleTest, HandleSetAnnotationModeMessage) { … }
TEST_F(PdfInkModuleTest, MaybeSetCursorWhenTogglingAnnotationMode) { … }
TEST_F(PdfInkModuleTest, MaybeSetCursorWhenChangingBrushes) { … }
TEST_F(PdfInkModuleTest, MaybeSetCursorWhenChangingZoom) { … }
class PdfInkModuleStrokeTest : public PdfInkModuleTest { … };
TEST_F(PdfInkModuleStrokeTest, NoAnnotationIfNotEnabled) { … }
TEST_F(PdfInkModuleStrokeTest, AnnotationIfEnabled) { … }
TEST_F(PdfInkModuleStrokeTest, CanonicalAnnotationPoints) { … }
TEST_F(PdfInkModuleStrokeTest, DrawRenderTransform) { … }
TEST_F(PdfInkModuleStrokeTest, InvalidationsFromStroke) { … }
TEST_F(PdfInkModuleStrokeTest, StrokeOutsidePage) { … }
TEST_F(PdfInkModuleStrokeTest, StrokeInsidePages) { … }
TEST_F(PdfInkModuleStrokeTest, StrokeAcrossPages) { … }
TEST_F(PdfInkModuleStrokeTest, StrokePageExitAndReentry) { … }
TEST_F(PdfInkModuleStrokeTest, StrokePageExitAndReentryWithQuickMoves) { … }
TEST_F(PdfInkModuleStrokeTest, EraseStroke) { … }
TEST_F(PdfInkModuleStrokeTest, EraseOnPageWithoutStrokes) { … }
TEST_F(PdfInkModuleStrokeTest, EraseStrokeEntirelyOffPage) { … }
TEST_F(PdfInkModuleStrokeTest, EraseStrokeErasesTwoStrokes) { … }
TEST_F(PdfInkModuleStrokeTest, EraseStrokesAcrossTwoPages) { … }
TEST_F(PdfInkModuleStrokeTest, EraseStrokePageExitAndReentry) { … }
class PdfInkModuleUndoRedoTest : public PdfInkModuleStrokeTest { … };
TEST_F(PdfInkModuleUndoRedoTest, UndoRedoEmpty) { … }
TEST_F(PdfInkModuleUndoRedoTest, UndoRedoBasic) { … }
TEST_F(PdfInkModuleUndoRedoTest, UndoRedoAnnotationModeDisabled) { … }
TEST_F(PdfInkModuleUndoRedoTest, UndoRedoBetweenDraws) { … }
TEST_F(PdfInkModuleUndoRedoTest, UndoRedoOnTwoPages) { … }
}
}