chromium/ui/accessibility/ax_node_position_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include <stdint.h>

#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/accessibility/ax_node_position.h"
#include "ui/accessibility/ax_range.h"
#include "ui/accessibility/ax_selection.h"
#include "ui/accessibility/ax_tree.h"
#include "ui/accessibility/ax_tree_data.h"
#include "ui/accessibility/ax_tree_id.h"
#include "ui/accessibility/ax_tree_update.h"
#include "ui/accessibility/test_single_ax_tree_manager.h"

namespace ui {

TestPositionType;
TestPositionRange;

namespace {

constexpr AXNodeID ROOT_ID =;
constexpr AXNodeID BUTTON_ID =;
constexpr AXNodeID CHECK_BOX_ID =;
constexpr AXNodeID TEXT_FIELD_ID =;
constexpr AXNodeID STATIC_TEXT1_ID =;
constexpr AXNodeID INLINE_BOX1_ID =;
constexpr AXNodeID LINE_BREAK_ID =;
constexpr AXNodeID STATIC_TEXT2_ID =;
constexpr AXNodeID INLINE_BOX2_ID =;

// A group of basic and extended characters.
constexpr const wchar_t* kGraphemeClusters[] =;

class AXPositionTest : public ::testing::Test, public TestSingleAXTreeManager {};

// Used by AXPositionExpandToEnclosingTextBoundaryTestWithParam.
//
// Every test instance starts from a pre-determined position and calls the
// ExpandToEnclosingTextBoundary method with the arguments provided in this
// struct.
struct ExpandToEnclosingTextBoundaryTestParam {};

// This is a fixture for a set of parameterized tests that test the
// |ExpandToEnclosingTextBoundary| method with all possible input arguments.
class AXPositionExpandToEnclosingTextBoundaryTestWithParam
    : public AXPositionTest,
      public ::testing::WithParamInterface<
          ExpandToEnclosingTextBoundaryTestParam> {};

// Used by AXPositionCreatePositionAtTextBoundaryTestWithParam.
//
// Every test instance starts from a pre-determined position and calls the
// CreatePositionAtTextBoundary method with the arguments provided in this
// struct.
struct CreatePositionAtTextBoundaryTestParam {};

// This is a fixture for a set of parameterized tests that test the
// |CreatePositionAtTextBoundary| method with all possible input arguments.
class AXPositionCreatePositionAtTextBoundaryTestWithParam
    : public AXPositionTest,
      public ::testing::WithParamInterface<
          CreatePositionAtTextBoundaryTestParam> {};

// Used by |AXPositionTextNavigationTestWithParam|.
//
// The test starts from a pre-determined position and repeats a text navigation
// operation, such as |CreateNextWordStartPosition|, until it runs out of
// expectations.
struct TextNavigationTestParam {};

// This is a fixture for a set of parameterized tests that ensure that text
// navigation operations, such as |CreateNextWordStartPosition|, work properly.
//
// Starting from a given position, test instances call a given text navigation
// method repeatedly and compare the return values to a set of expectations.
//
// TODO(nektar): Only text positions are tested for now.
class AXPositionTextNavigationTestWithParam
    : public AXPositionTest,
      public ::testing::WithParamInterface<TextNavigationTestParam> {};

// Most tests use kSuppressCharacter behavior.
AXPositionTest::AXPositionTest()
    :{}

const char* AXPositionTest::TEXT_VALUE =;

void AXPositionTest::SetUp() {}

std::unique_ptr<AXTree> AXPositionTest::CreateMultipageDocument(
    AXNodeData& root_data,
    AXNodeData& page_1_data,
    AXNodeData& page_1_text_data,
    AXNodeData& page_2_data,
    AXNodeData& page_2_text_data,
    AXNodeData& page_3_data,
    AXNodeData& page_3_text_data) const {}

void AXPositionTest::CreateBrowserWindow(
    AXNodeData& window,
    AXNodeData& back_button,
    AXNodeData& web_view,
    AXNodeData& root_web_area,
    AXNodeData& iframe_root,
    AXNodeData& paragraph,
    AXNodeData& address_bar,
    std::vector<TestSingleAXTreeManager>& out_managers) const {}

std::unique_ptr<AXTree> AXPositionTest::CreateMultilingualDocument(
    std::vector<int>* text_offsets) const {}

void AXPositionTest::AssertTextLengthEquals(const AXNodeID& node_id,
                                            int expected_text_length) const {}

std::unique_ptr<AXTree> AXPositionTest::CreateAXTree(
    const std::vector<AXNodeData>& nodes,
    const AXTreeID& parent_tree_id) const {}

}  // namespace

// TODO(crbug.com/40869528): Re-enable this test
TEST_F(AXPositionTest, DISABLED_Clone) {}

TEST_F(AXPositionTest, Serialize) {}

TEST_F(AXPositionTest, ToString) {}

// TODO(crbug.com/40869528): Re-enable this test
TEST_F(AXPositionTest, DISABLED_IsIgnored) {}

TEST_F(AXPositionTest, GetTextFromNullPosition) {}

TEST_F(AXPositionTest, GetTextFromRoot) {}

TEST_F(AXPositionTest, GetTextFromButton) {}

TEST_F(AXPositionTest, GetTextFromCheckbox) {}

TEST_F(AXPositionTest, GetTextFromTextField) {}

TEST_F(AXPositionTest, GetTextFromStaticText) {}

TEST_F(AXPositionTest, GetTextFromInlineTextBox) {}

TEST_F(AXPositionTest, GetTextFromLineBreak) {}

TEST_F(AXPositionTest, IsInLineBreak) {}

TEST_F(AXPositionTest, IsInWhiteSpace) {}

TEST_F(AXPositionTest, GetMaxTextOffsetFromNullPosition) {}

TEST_F(AXPositionTest, GetMaxTextOffsetFromRoot) {}

TEST_F(AXPositionTest, GetMaxTextOffsetFromButton) {}

TEST_F(AXPositionTest, GetMaxTextOffsetFromCheckbox) {}

TEST_F(AXPositionTest, GetMaxTextOffsetFromTextfield) {}

TEST_F(AXPositionTest, GetMaxTextOffsetFromStaticText) {}

TEST_F(AXPositionTest, GetMaxTextOffsetFromInlineTextBox) {}

TEST_F(AXPositionTest, GetMaxTextOffsetFromLineBreak) {}

TEST_F(AXPositionTest, GetMaxTextOffsetUpdate) {}

TEST_F(AXPositionTest, GetMaxTextOffsetAndGetTextWithGeneratedContent) {}

TEST_F(AXPositionTest, AtStartOfAnchorWithNullPosition) {}

TEST_F(AXPositionTest, AtStartOfAnchorWithTreePosition) {}

TEST_F(AXPositionTest, AtStartOfAnchorWithTextPosition) {}

TEST_F(AXPositionTest, AtEndOfAnchorWithNullPosition) {}

TEST_F(AXPositionTest, AtEndOfAnchorWithTreePosition) {}

TEST_F(AXPositionTest, AtEndOfAnchorWithTextPosition) {}

TEST_F(AXPositionTest, AtStartOfLineWithTextPosition) {}

TEST_F(AXPositionTest, AtStartOfLineStaticTextExtraPrecedingSpace) {}

TEST_F(AXPositionTest, AtEndOfLineWithTextPosition) {}

TEST_F(AXPositionTest, AtStartOfBlankLine) {}

TEST_F(AXPositionTest, AtEndOfBlankLine) {}

TEST_F(AXPositionTest, AtStartAndEndOfLineWhenAtEndOfTextSpan) {}

TEST_F(AXPositionTest, AtStartAndEndOfLineInsideTextField) {}

TEST_F(AXPositionTest, AtStartOfParagraphWithTextPosition) {}

TEST_F(AXPositionTest, AtEndOfParagraphWithTextPosition) {}

TEST_F(AXPositionTest, AtStartOrEndOfParagraphWithPreservedNewLine) {}

TEST_F(AXPositionTest, TreePositionAtStartOrEndOfListMarkerAnchor) {}

TEST_F(AXPositionTest, AtStartOrEndOfParagraphOnAListMarker) {}

TEST_F(AXPositionTest,
       AtStartOrEndOfParagraphWithLeadingAndTrailingWhitespace) {}

TEST_F(AXPositionTest, AtStartOrEndOfParagraphWithIgnoredNodes) {}

TEST_F(AXPositionTest, AtStartOrEndOfParagraphWithEmbeddedObjectCharacter) {}

TEST_F(AXPositionTest, CreateNextOrPreviousParagraphPositionWithIgnoredNodes) {}

TEST_F(
    AXPositionTest,
    CreatePreviousParagraphEndPositionStopAtAnchorBoundaryWithConsecutiveParentChildLineBreakingObjects) {}

TEST_F(AXPositionTest, LowestCommonAncestor) {}

TEST_F(AXPositionTest, AsTreePositionWithNullPosition) {}

TEST_F(AXPositionTest, AsTreePositionWithTreePosition) {}

TEST_F(AXPositionTest, AsTreePositionWithTextPosition) {}

TEST_F(AXPositionTest, AsTextPositionWithNullPosition) {}

TEST_F(AXPositionTest, AsTextPositionWithTreePosition) {}

TEST_F(AXPositionTest, AsTextPositionWithTextPosition) {}

TEST_F(AXPositionTest, AsLeafTreePositionWithNullPosition) {}

TEST_F(AXPositionTest, AsLeafTreePositionWithTreePosition) {}

TEST_F(AXPositionTest, AsLeafTreePositionWithTextPosition) {}

TEST_F(AXPositionTest, AsLeafTextPositionWithNullPosition) {}

TEST_F(AXPositionTest, AsLeafTextPositionWithTreePosition) {}

TEST_F(AXPositionTest,
       AsLeafTextPositionWithTreePositionAndEmptyLeafDescendants) {}

TEST_F(AXPositionTest, AsLeafTextPositionWithTextPosition) {}

TEST_F(AXPositionTest, AsLeafTextPositionWithTextPositionAndEmptyTextSandwich) {}

TEST_F(AXPositionTest, AsLeafTextPositionWithTextPositionAndEmbeddedObject) {}

TEST_F(AXPositionTest, AsUnignoredPosition) {}

TEST_F(AXPositionTest, CreatePositionAtTextBoundaryContentStartEndIsIgnored) {}

TEST_F(AXPositionTest, CreatePositionAtInvalidGraphemeBoundary) {}

TEST_F(AXPositionTest, CreatePositionAtStartOfAnchorWithNullPosition) {}

TEST_F(AXPositionTest, CreatePositionAtStartOfAnchorWithTreePosition) {}

TEST_F(AXPositionTest, CreatePositionAtStartOfAnchorWithTextPosition) {}

TEST_F(AXPositionTest, CreatePositionAtEndOfAnchorWithNullPosition) {}

TEST_F(AXPositionTest, CreatePositionAtEndOfAnchorWithTreePosition) {}

TEST_F(AXPositionTest, CreatePositionAtEndOfAnchorWithTextPosition) {}

TEST_F(AXPositionTest, CreatePositionAtPreviousFormatStartWithNullPosition) {}

TEST_F(AXPositionTest, CreatePositionAtPreviousFormatStartWithTreePosition) {}

TEST_F(AXPositionTest, CreatePositionAtPreviousFormatStartWithTextPosition) {}

TEST_F(AXPositionTest, CreatePositionAtNextFormatEndWithNullPosition) {}

TEST_F(AXPositionTest, CreatePositionAtNextFormatEndWithTreePosition) {}

TEST_F(AXPositionTest, CreatePositionAtNextFormatEndWithTextPosition) {}

TEST_F(AXPositionTest, CreatePositionAtNextFormatEndOnEmbeddedObject) {}

TEST_F(AXPositionTest, CreatePositionAtFormatBoundaryWithTextPosition) {}

TEST_F(AXPositionTest, MoveByFormatWithIgnoredNodes) {}

TEST_F(AXPositionTest, CreatePositionAtPageBoundaryWithNullPosition) {}

TEST_F(AXPositionTest, CreatePositionAtPageBoundaryWithTreePosition) {}

TEST_F(AXPositionTest, CreatePositionAtPageBoundaryWithTextPosition) {}

TEST_F(AXPositionTest, CreatePositionAtPageBoundaryWithNonPaginatedDocument) {}

TEST_F(AXPositionTest, CreatePositionAtStartOfAXTreeWithNullPosition) {}

TEST_F(AXPositionTest, CreatePositionAtStartOfAXTreeWithTreePosition) {}

TEST_F(AXPositionTest, CreatePositionAtStartOfAXTreeWithTextPosition) {}

TEST_F(AXPositionTest, CreatePositionAtEndOfAXTreeWithNullPosition) {}

TEST_F(AXPositionTest, CreatePositionAtEndOfAXTreeWithTreePosition) {}

TEST_F(AXPositionTest, CreatePositionAtEndOfAXTreeWithTextPosition) {}

TEST_F(AXPositionTest, CreatePositionAtStartOfContentWithNullPosition) {}

TEST_F(AXPositionTest, CreatePositionAtStartOfContentWithTreePosition) {}

TEST_F(AXPositionTest, CreatePositionAtStartOfContentWithTextPosition) {}

TEST_F(AXPositionTest, CreatePositionAtEndOfContentWithNullPosition) {}

TEST_F(AXPositionTest, CreatePositionAtEndOfContentWithTreePosition) {}

TEST_F(AXPositionTest, CreatePositionAtEndOfContentWithTextPosition) {}

TEST_F(AXPositionTest, CreateChildPositionAtWithNullPosition) {}

TEST_F(AXPositionTest, CreateChildPositionAtWithTreePosition) {}

TEST_F(AXPositionTest, CreateChildPositionAtWithTextPosition) {}

TEST_F(AXPositionTest, CreateParentPositionWithNullPosition) {}

TEST_F(AXPositionTest, CreateParentPositionWithTreePosition) {}

TEST_F(AXPositionTest, CreateParentPositionWithTextPosition) {}

TEST_F(AXPositionTest, CreateParentPositionWithMoveDirection) {}

TEST_F(AXPositionTest, CreateParentAndLeafPositionWithIgnoredNodes) {}

TEST_F(AXPositionTest, CreateParentAndLeafPositionWithEmptyNodes) {}

TEST_F(AXPositionTest, CreateParentAndLeafPositionWithEmbeddedObjects) {}

TEST_F(AXPositionTest, CreateNextAndPreviousLeafTextPositionWithNullPosition) {}

TEST_F(AXPositionTest, CreateNextLeafTextPosition) {}

TEST_F(AXPositionTest, CreatePreviousLeafTextPosition) {}

TEST_F(AXPositionTest, CreateNextLeafTreePosition) {}

TEST_F(AXPositionTest, CreatePreviousLeafTreePosition) {}

TEST_F(AXPositionTest,
       AsLeafTextPositionBeforeAndAfterCharacterWithNullPosition) {}

// TODO(crbug.com/40059879) It is not legal to call
// AsLeafTextPositionBeforeCharacter or AsLeafTextPositionAfterCharacter with
// a text position using out-of-range offsets. It's necessary to call
// AsValidPosition() first. Therefore, this test currently triggers a DCHECK.
TEST_F(AXPositionTest,
       DISABLED_AsLeafTextPositionBeforeAndAfterCharacterWithInvalidPosition) {}

TEST_F(AXPositionTest,
       AsLeafTextPositionBeforeAndAfterCharacterAtInvalidGraphemeBoundary) {}

TEST_F(AXPositionTest, AsLeafTextPositionBeforeCharacterNoAdjustment) {}

TEST_F(AXPositionTest, AsLeafTextPositionAfterCharacterNoAdjustment) {}

TEST_F(AXPositionTest, AsLeafTextPositionBeforeCharacter) {}

TEST_F(AXPositionTest,
       AsLeafTextPositionBeforeCharacterIncludingGeneratedNewlines) {}

TEST_F(AXPositionTest, AsLeafTextPositionAfterCharacter) {}

TEST_F(AXPositionTest,
       AsLeafTextPositionAfterCharacterIncludingGeneratedNewlines) {}

TEST_F(AXPositionTest, CreateNextAndPreviousCharacterPositionWithNullPosition) {}

TEST_F(AXPositionTest, AsValidPosition) {}

TEST_F(AXPositionTest, AsValidPositionInDescendantOfEmptyObject) {}

TEST_F(AXPositionTest, CreateNextCharacterPosition) {}

TEST_F(AXPositionTest, CreateNextCharacterPositionIncludingGeneratedNewlines) {}

TEST_F(AXPositionTest, CreatePreviousCharacterPosition) {}

TEST_F(AXPositionTest,
       CreatePreviousCharacterPositionIncludingGeneratedNewlines) {}

TEST_F(AXPositionTest, CreateNextCharacterPositionAtGraphemeBoundary) {}

TEST_F(AXPositionTest, CreatePreviousCharacterPositionAtGraphemeBoundary) {}

TEST_F(AXPositionTest, ReciprocalCreateNextAndPreviousCharacterPosition) {}

TEST_F(AXPositionTest, CreateNextAndPreviousWordStartPositionWithNullPosition) {}

TEST_F(AXPositionTest, CreateNextAndPreviousWordEndPositionWithNullPosition) {}

TEST_F(AXPositionTest, OperatorEquals) {}

TEST_F(AXPositionTest, OperatorEqualsSameTextOffsetSameAnchorId) {}

TEST_F(AXPositionTest, OperatorEqualsSameTextOffsetDifferentAnchorIdRoot) {}

TEST_F(AXPositionTest, OperatorEqualsSameTextOffsetDifferentAnchorIdLeaf) {}

TEST_F(AXPositionTest, OperatorEqualsTextPositionsInTextField) {}

TEST_F(AXPositionTest, OperatorEqualsTextPositionsInSearchBox) {}

TEST_F(AXPositionTest, OperatorsTreePositionsAroundEmbeddedCharacter) {}

TEST_F(AXPositionTest, OperatorsTextPositionsAroundEmbeddedCharacter) {}

TEST_F(AXPositionTest, OperatorsLessThanAndGreaterThan) {}

TEST_F(AXPositionTest, Swap) {}

TEST_F(AXPositionTest, CreateNextAnchorPosition) {}

TEST_F(AXPositionTest, CreateLinePositionsMultipleAnchorsInSingleLine) {}

TEST_F(AXPositionTest, CreateNextWordPositionInList) {}

TEST_F(AXPositionTest, CreatePreviousWordPositionInList) {}

TEST_F(AXPositionTest, EmptyObjectReplacedByCharacterTextNavigation) {}

TEST_F(AXPositionTest, EmptyObjectReplacedByCharacterEmbedObject) {}

TEST_F(AXPositionTest, TextNavigationWithCollapsedCombobox) {}

TEST_F(AXPositionTest, GetUnignoredSelectionWithLeafNodes) {}

//
// Parameterized tests.
//

TEST_P(AXPositionExpandToEnclosingTextBoundaryTestWithParam,
       TextPositionBeforeLine2) {}

TEST_P(AXPositionCreatePositionAtTextBoundaryTestWithParam,
       TextPositionBeforeStaticText) {}

TEST_P(AXPositionTextNavigationTestWithParam,
       TraverseTreeStartingWithAffinityDownstream) {}

TEST_P(AXPositionTextNavigationTestWithParam,
       TraverseTreeStartingWithAffinityUpstream) {}

//
// Instantiations of parameterized tests.
//

INSTANTIATE_TEST_SUITE_P();

// Only test with {AXBoundaryBehavior::kCrossBoundary,
// AXBoundaryDetection::kDontCheckInitialPosition} for now.
// TODO(accessibility): Add more tests for other boundary behaviors if needed.
INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P(
    CreateNextSentenceStartPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextSentenceStartPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextSentenceStartPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextSentenceStartPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousSentenceStartPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousSentenceStartPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousSentenceStartPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousSentenceStartPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextSentenceEndPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextSentenceEndPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextSentenceEndPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextSentenceEndPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousSentenceEndPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousSentenceEndPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousSentenceEndPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousSentenceEndPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextWordStartPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextWordStartPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextWordStartPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextWordStartPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousWordStartPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousWordStartPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousWordStartPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousWordStartPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextWordEndPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextWordEndPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextWordEndPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextWordEndPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousWordEndPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousWordEndPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousWordEndPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousWordEndPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextLineStartPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextLineStartPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextLineStartPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextLineStartPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousLineStartPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousLineStartPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousLineStartPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousLineStartPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextLineEndPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextLineEndPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextLineEndPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextLineEndPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousLineEndPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousLineEndPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousLineEndPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousLineEndPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextParagraphStartPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextParagraphStartPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextParagraphStartPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextParagraphStartPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousParagraphStartPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousParagraphStartPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousParagraphStartPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousParagraphStartPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextParagraphEndPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextParagraphEndPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextParagraphEndPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreateNextParagraphEndPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousParagraphEndPositionWithBoundaryBehaviorCrossBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousParagraphEndPositionWithBoundaryBehaviorStopAtAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousParagraphEndPositionWithBoundaryBehaviorStopAtAnchorBoundaryOrIfAlreadyAtBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

INSTANTIATE_TEST_SUITE_P(
    CreatePreviousParagraphEndPositionWithBoundaryBehaviorStopAtLastAnchorBoundary,
    AXPositionTextNavigationTestWithParam,
    ::testing::Values(
        TextNavigationTestParam{};

}  // namespace ui