chromium/third_party/blink/renderer/core/editing/caret_display_item_client_test.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/editing/caret_display_item_client.h"

#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/renderer/core/editing/frame_caret.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/editing/position_with_affinity.h"
#include "third_party/blink/renderer/core/editing/selection_template.h"
#include "third_party/blink/renderer/core/editing/testing/editing_test_base.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/input/event_handler.h"
#include "third_party/blink/renderer/core/layout/inline/inline_cursor.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/page/focus_controller.h"
#include "third_party/blink/renderer/core/paint/paint_and_raster_invalidation_test.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
#include "third_party/blink/renderer/platform/testing/find_cc_layer.h"
#include "third_party/blink/renderer/platform/testing/picture_matchers.h"

namespace blink {

ElementsAre;
UnorderedElementsAre;

#define ASSERT_CARET_LAYER()

class CaretDisplayItemClientTest : public PaintAndRasterInvalidationTest {};

INSTANTIATE_PAINT_TEST_SUITE_P();

TEST_P(CaretDisplayItemClientTest, CaretPaintInvalidation) {}

TEST_P(CaretDisplayItemClientTest, CaretMovesBetweenBlocks) {}

TEST_P(CaretDisplayItemClientTest, UpdatePreviousLayoutBlock) {}

TEST_P(CaretDisplayItemClientTest, EnsureInvalidatePreviousLayoutBlock) {}

TEST_P(CaretDisplayItemClientTest, CaretHideMoveAndShow) {}

TEST_P(CaretDisplayItemClientTest, BlinkingCaretNoInvalidation) {}

TEST_P(CaretDisplayItemClientTest, CompositingChange) {}

TEST_P(CaretDisplayItemClientTest, PlainTextRTLCaretPosition) {}

#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_IOS)
// TODO(crbug.com/1457081): Previously, this test passed on the Mac bots even
// though `LoadNoto()` always failed. Now that `LoadNoto()` actually succeeds,
// this test fails on Mac and iOS though...
#define MAYBE_InsertSpaceToWhiteSpacePreWrapRTL
#else
#define MAYBE_InsertSpaceToWhiteSpacePreWrapRTL
#endif
// http://crbug.com/1278559
TEST_P(CaretDisplayItemClientTest, MAYBE_InsertSpaceToWhiteSpacePreWrapRTL) {}

// http://crbug.com/1278559
TEST_P(CaretDisplayItemClientTest, InsertSpaceToWhiteSpacePreWrap) {}

// http://crbug.com/1330093
TEST_P(CaretDisplayItemClientTest, CaretAtStartInWhiteSpacePreWrapRTL) {}

// https://crbug.com/1499405
TEST_P(CaretDisplayItemClientTest, CaretAtEdgeOfInlineBlock) {}

class ComputeCaretRectTest : public EditingTestBase {};

TEST_P(CaretDisplayItemClientTest, FullDocumentPaintingWithCaret) {}

TEST_F(ComputeCaretRectTest, CaretRectAfterEllipsisNoCrash) {}

TEST_F(ComputeCaretRectTest, CaretRectAvoidNonEditable) {}

}  // namespace blink