![]() |
Flutter Engine
The Flutter Engine
|
#include "ax/platform/ax_platform_node_win_unittest.h"
#include <UIAutomationClient.h>
#include <UIAutomationCoreApi.h>
#include <filesystem>
#include <memory>
#include <utility>
#include "ax/ax_tree.h"
#include "ax/platform/ax_fragment_root_win.h"
#include "ax/platform/ax_platform_node_textrangeprovider_win.h"
#include "base/win/atl.h"
#include "base/win/scoped_bstr.h"
#include "base/win/scoped_safearray.h"
#include "base/win/scoped_variant.h"
#include "flutter/fml/icu_util.h"
#include "third_party/icu/source/common/unicode/putil.h"
Go to the source code of this file.
Classes | |
class | ui::AXPlatformNodeTextRangeProviderTest |
class | ui::MockAXPlatformNodeTextRangeProviderWin |
Namespaces | |
namespace | ui |
Macros | |
#define | EXPECT_UIA_ELEMENTNOTAVAILABLE(expr) EXPECT_EQ(static_cast<HRESULT>(UIA_E_ELEMENTNOTAVAILABLE), (expr)) |
#define | EXPECT_UIA_INVALIDOPERATION(expr) EXPECT_EQ(static_cast<HRESULT>(UIA_E_INVALIDOPERATION), (expr)) |
#define | EXPECT_UIA_ELEMENTNOTENABLED(expr) EXPECT_EQ(static_cast<HRESULT>(UIA_E_ELEMENTNOTENABLED), (expr)) |
#define | EXPECT_UIA_NOTSUPPORTED(expr) EXPECT_EQ(static_cast<HRESULT>(UIA_E_NOTSUPPORTED), (expr)) |
#define | ASSERT_UIA_ELEMENTNOTAVAILABLE(expr) ASSERT_EQ(static_cast<HRESULT>(UIA_E_ELEMENTNOTAVAILABLE), (expr)) |
#define | ASSERT_UIA_INVALIDOPERATION(expr) ASSERT_EQ(static_cast<HRESULT>(UIA_E_INVALIDOPERATION), (expr)) |
#define | ASSERT_UIA_ELEMENTNOTENABLED(expr) ASSERT_EQ(static_cast<HRESULT>(UIA_E_ELEMENTNOTENABLED), (expr)) |
#define | ASSERT_UIA_NOTSUPPORTED(expr) ASSERT_EQ(static_cast<HRESULT>(UIA_E_NOTSUPPORTED), (expr)) |
#define | EXPECT_UIA_GETPROPERTYVALUE_EQ(node, property_id, expected) |
#define | EXPECT_UIA_ELEMENT_ARRAY_BSTR_EQ(array, element_test_property_id, expected_property_values) |
#define | EXPECT_UIA_SAFEARRAY_EQ(safearray, expected_property_values) |
#define | EXPECT_UIA_TEXTATTRIBUTE_EQ(provider, attribute, variant) |
#define | EXPECT_UIA_TEXTATTRIBUTE_MIXED(provider, attribute) |
#define | EXPECT_UIA_TEXTATTRIBUTE_NOTSUPPORTED(provider, attribute) |
#define | EXPECT_UIA_TEXTRANGE_EQ(provider, expected_content) |
#define | EXPECT_UIA_FIND_TEXT(text_range_provider, search_term, ignore_case, owner) |
#define | EXPECT_UIA_FIND_TEXT_NO_MATCH(text_range_provider, search_term, ignore_case, owner) |
#define | EXPECT_UIA_MOVE_ENDPOINT_BY_UNIT(text_range_provider, endpoint, unit, count, expected_text, expected_count) |
#define | EXPECT_UIA_MOVE(text_range_provider, unit, count, expected_text, expected_count) |
#define | EXPECT_ENCLOSING_ELEMENT(ax_node_given, ax_node_expected) |
#define | DCHECK_EQ(a, b) BASE_DCHECK((a) == (b)) |
Functions | |
static bool | ui::StringCompareICU (BSTR left, BSTR right) |
static AXNodePosition::AXPositionInstance | ui::CreateTextPosition (const AXNode &anchor, int text_offset, ax::mojom::TextAffinity affinity) |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderClone) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderCompareEndpoints) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderExpandToEnclosingCharacter) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderExpandToEnclosingWord) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderExpandToEnclosingLine) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderExpandToEnclosingParagraph) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderExpandToEnclosingFormat) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderExpandToEnclosingFormatWithEmptyObjects) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderExpandToEnclosingDocument) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderIgnoredForTextNavigation) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderInvalidCalls) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderGetText) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderMoveCharacter) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderMoveFormat) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderMoveWord) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderMoveLine) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderMoveParagraph) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderMoveDocument) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderMove) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderMoveEndpointByDocument) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderMoveEndpointByCharacterMultilingual) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderMoveEndpointByWord) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderMoveEndpointByLine) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderMoveEndpointByUnitTextField) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderMoveEndpointByFormat) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderCompare) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderSelection) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderGetBoundingRectangles) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderGetEnclosingElement) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderGetEnclosingElementRichButton) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderMoveEndpointByRange) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderGetAttributeValue) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderGetAttributeValueAnnotationObjects) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderGetAttributeValueAnnotationObjectsMixed) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderGetAttributeValueNotSupported) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderGetAttributeValueWithAncestorTextPosition) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderSelect) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderSelectListMarker) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderFindText) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, FindTextWithEmbeddedObjectCharacter) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderFindTextBackwards) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestITextRangeProviderFindAttribute) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, ElementNotAvailable) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestITextRangeProviderIgnoredNodes) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestNormalizeTextRangePastEndOfDocument) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestNormalizeTextRangePastEndOfDocumentWithIgnoredNodes) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestNormalizeTextRangeInsideIgnoredNodes) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestNormalizeTextRangeSpanIgnoredNodes) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestNormalizeTextRangeForceSameAnchorOnDegenerateRange) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestValidateStartAndEnd) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestReplaceStartAndEndEndpointNode) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestDeleteSubtreeThatIncludesEndpoints) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestDeleteSubtreeWithIgnoredAncestors) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_TestDeleteSubtreeThatIncludesEndpointsNormalizeMoves) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestDeleteTreePositionPreviousSibling) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, TestReplaceStartAndEndEndpointRepeatRemoval) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, CaretAtEndOfTextFieldReadOnly) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_GeneratedNewlineReturnsCommonAnchorReadonly) | |
ui::TEST_F (AXPlatformNodeTextRangeProviderTest, DISABLED_MoveEndpointToLastIgnoredForTextNavigationNode) | |
#define ASSERT_UIA_ELEMENTNOTAVAILABLE | ( | expr | ) | ASSERT_EQ(static_cast<HRESULT>(UIA_E_ELEMENTNOTAVAILABLE), (expr)) |
Definition at line 38 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define ASSERT_UIA_ELEMENTNOTENABLED | ( | expr | ) | ASSERT_EQ(static_cast<HRESULT>(UIA_E_ELEMENTNOTENABLED), (expr)) |
Definition at line 42 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define ASSERT_UIA_INVALIDOPERATION | ( | expr | ) | ASSERT_EQ(static_cast<HRESULT>(UIA_E_INVALIDOPERATION), (expr)) |
Definition at line 40 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define ASSERT_UIA_NOTSUPPORTED | ( | expr | ) | ASSERT_EQ(static_cast<HRESULT>(UIA_E_NOTSUPPORTED), (expr)) |
Definition at line 44 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define DCHECK_EQ | ( | a, | |
b | |||
) | BASE_DCHECK((a) == (b)) |
Definition at line 213 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_ENCLOSING_ELEMENT | ( | ax_node_given, | |
ax_node_expected | |||
) |
Definition at line 201 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_ELEMENT_ARRAY_BSTR_EQ | ( | array, | |
element_test_property_id, | |||
expected_property_values | |||
) |
Definition at line 60 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_ELEMENTNOTAVAILABLE | ( | expr | ) | EXPECT_EQ(static_cast<HRESULT>(UIA_E_ELEMENTNOTAVAILABLE), (expr)) |
Definition at line 29 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_ELEMENTNOTENABLED | ( | expr | ) | EXPECT_EQ(static_cast<HRESULT>(UIA_E_ELEMENTNOTENABLED), (expr)) |
Definition at line 33 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_FIND_TEXT | ( | text_range_provider, | |
search_term, | |||
ignore_case, | |||
owner | |||
) |
Definition at line 150 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_FIND_TEXT_NO_MATCH | ( | text_range_provider, | |
search_term, | |||
ignore_case, | |||
owner | |||
) |
Definition at line 171 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_GETPROPERTYVALUE_EQ | ( | node, | |
property_id, | |||
expected | |||
) |
Definition at line 47 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_INVALIDOPERATION | ( | expr | ) | EXPECT_EQ(static_cast<HRESULT>(UIA_E_INVALIDOPERATION), (expr)) |
Definition at line 31 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_MOVE | ( | text_range_provider, | |
unit, | |||
count, | |||
expected_text, | |||
expected_count | |||
) |
Definition at line 191 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_MOVE_ENDPOINT_BY_UNIT | ( | text_range_provider, | |
endpoint, | |||
unit, | |||
count, | |||
expected_text, | |||
expected_count | |||
) |
Definition at line 181 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_NOTSUPPORTED | ( | expr | ) | EXPECT_EQ(static_cast<HRESULT>(UIA_E_NOTSUPPORTED), (expr)) |
Definition at line 35 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_SAFEARRAY_EQ | ( | safearray, | |
expected_property_values | |||
) |
Definition at line 85 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_TEXTATTRIBUTE_EQ | ( | provider, | |
attribute, | |||
variant | |||
) |
Definition at line 110 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_TEXTATTRIBUTE_MIXED | ( | provider, | |
attribute | |||
) |
Definition at line 118 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_TEXTATTRIBUTE_NOTSUPPORTED | ( | provider, | |
attribute | |||
) |
Definition at line 130 of file ax_platform_node_textrangeprovider_win_unittest.cc.
#define EXPECT_UIA_TEXTRANGE_EQ | ( | provider, | |
expected_content | |||
) |
Definition at line 142 of file ax_platform_node_textrangeprovider_win_unittest.cc.