#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include <memory>
#include "base/memory/scoped_refptr.h"
#include "base/test/scoped_feature_list.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/web/web_range.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/text.h"
#include "third_party/blink/renderer/core/editing/ephemeral_range.h"
#include "third_party/blink/renderer/core/editing/frame_caret.h"
#include "third_party/blink/renderer/core/editing/iterators/text_iterator.h"
#include "third_party/blink/renderer/core/editing/selection_controller.h"
#include "third_party/blink/renderer/core/editing/selection_modifier.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/editing/visible_position.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/html/html_body_element.h"
#include "third_party/blink/renderer/core/input/event_handler.h"
#include "third_party/blink/renderer/core/layout/layout_block.h"
#include "third_party/blink/renderer/core/page/context_menu_controller.h"
#include "third_party/blink/renderer/core/paint/paint_info.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
#include "third_party/blink/renderer/core/testing/dummy_page_holder.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/graphics/paint/drawing_recorder.h"
#include "third_party/blink/renderer/platform/testing/fake_display_item_client.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/vector2d.h"
namespace blink {
IsNull;
class FrameSelectionTest : public EditingTestBase { … };
Text* FrameSelectionTest::AppendTextNode(const String& data) { … }
bool FrameSelectionTest::SelectWordAroundPosition(const Position& position) { … }
bool FrameSelectionTest::SelectWordAroundCaret() { … }
bool FrameSelectionTest::SelectSentenceAroundCaret() { … }
TEST_F(FrameSelectionTest, FirstEphemeralRangeOf) { … }
TEST_F(FrameSelectionTest, SetValidSelection) { … }
#define EXPECT_EQ_SELECTED_TEXT(text) …
TEST_F(FrameSelectionTest, SelectWordAroundCaret) { … }
TEST_F(FrameSelectionTest, SelectWordAroundCaret2) { … }
TEST_F(FrameSelectionTest, SelectAroundCaret_Word) { … }
TEST_F(FrameSelectionTest, SelectAroundCaret_Sentence) { … }
TEST_F(FrameSelectionTest, SelectAroundCaret_ShouldShowHandle) { … }
TEST_F(FrameSelectionTest, SelectAroundCaret_ShouldShowContextMenu) { … }
TEST_F(FrameSelectionTest, GetSelectionRangeAroundCaret_Word) { … }
TEST_F(FrameSelectionTest, GetSelectionRangeAroundCaret_Sentence) { … }
TEST_F(FrameSelectionTest, ModifyExtendWithFlatTree) { … }
TEST_F(FrameSelectionTest, ModifyWithUserTriggered) { … }
TEST_F(FrameSelectionTest, MoveRangeSelectionTest) { … }
TEST_F(FrameSelectionTest, MoveRangeSelectionNoLiveness) { … }
TEST_F(FrameSelectionTest, SelectAllWithInputElement) { … }
TEST_F(FrameSelectionTest, SelectAllWithUnselectableRoot) { … }
TEST_F(FrameSelectionTest, SelectAllPreservesHandle) { … }
TEST_F(FrameSelectionTest, BoldCommandPreservesHandle) { … }
TEST_F(FrameSelectionTest, SelectionOnRangeHidesHandles) { … }
TEST_F(FrameSelectionTest, SelectInvalidPositionInFlatTreeDoesntCrash) { … }
TEST_F(FrameSelectionTest, CaretInShadowTree) { … }
TEST_F(FrameSelectionTest, CaretInTextControl) { … }
TEST_F(FrameSelectionTest, RangeInShadowTree) { … }
TEST_F(FrameSelectionTest, RangeInTextControl) { … }
TEST_F(FrameSelectionTest, FocusingLinkHidesCaretInTextControl) { … }
TEST_F(FrameSelectionTest, FocusingLinkHidesRangeInTextControl) { … }
TEST_F(FrameSelectionTest, FocusingButtonHidesRangeInReadOnlyTextControl) { … }
TEST_F(FrameSelectionTest, FocusingButtonHidesRangeInDisabledTextControl) { … }
TEST_F(FrameSelectionTest, FocusingNonEditableParentHidesCaretInTextControl) { … }
TEST_F(FrameSelectionTest, FocusingNonEditableParentHidesRangeInTextControl) { … }
TEST_F(FrameSelectionTest, CaretInEditableDiv) { … }
TEST_F(FrameSelectionTest, RangeInEditableDiv) { … }
TEST_F(FrameSelectionTest, RangeInEditableDivInShadowTree) { … }
TEST_F(FrameSelectionTest, FocusingLinkHidesCaretInContentEditable) { … }
TEST_F(FrameSelectionTest, FocusingLinkKeepsRangeInContentEditable) { … }
TEST_F(FrameSelectionTest, FocusingEditableParentKeepsEditableCaret) { … }
TEST_F(FrameSelectionTest, FocusingEditableParentKeepsEditableRange) { … }
TEST_F(FrameSelectionTest, FocusingNonEditableParentHidesEditableCaret) { … }
TEST_F(FrameSelectionTest, FocusingNonEditableParentKeepsEditableRange) { … }
TEST_F(FrameSelectionTest, RangeContainsFocus) { … }
TEST_F(FrameSelectionTest, RangeOutsideFocus) { … }
TEST_F(FrameSelectionTest, InconsistentVisibleSelectionNoCrash) { … }
TEST_F(FrameSelectionTest, SelectionBounds) { … }
TEST_F(FrameSelectionTest, AbosluteSelectionBoundsAfterScroll) { … }
TEST_F(FrameSelectionTest, SelectionContainsBidiBoundary) { … }
TEST_F(FrameSelectionTest, SelectedTextForClipboardEntersTextControls) { … }
TEST_F(FrameSelectionTest, PositionDisconnectedInFlatTree) { … }
TEST_F(FrameSelectionTest, PaintCaretRecordsSelectionWithNoSelectionHandles) { … }
}