Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
ui::TestAXNodeWrapper Class Reference

#include <test_ax_node_wrapper.h>

Inheritance diagram for ui::TestAXNodeWrapper:
ui::AXPlatformNodeDelegateBase ui::AXPlatformNodeDelegate

Public Member Functions

 ~TestAXNodeWrapper () override
 
AXPlatformNodeax_platform_node () const
 
void set_minimized (bool minimized)
 
void BuildAllWrappers (AXTree *tree, AXNode *node)
 
void ResetNativeEventTarget ()
 
const AXNodeDataGetData () const override
 
const AXTreeDataGetTreeData () const override
 
const AXTree::Selection GetUnignoredSelection () const override
 
AXNodePosition::AXPositionInstance CreateTextPositionAt (int offset) const override
 
gfx::NativeViewAccessible GetNativeViewAccessible () override
 
gfx::NativeViewAccessible GetParent () override
 
int GetChildCount () const override
 
gfx::NativeViewAccessible ChildAtIndex (int index) override
 
gfx::Rect GetBoundsRect (const AXCoordinateSystem coordinate_system, const AXClippingBehavior clipping_behavior, AXOffscreenResult *offscreen_result) const override
 
gfx::Rect GetInnerTextRangeBoundsRect (const int start_offset, const int end_offset, const AXCoordinateSystem coordinate_system, const AXClippingBehavior clipping_behavior, AXOffscreenResult *offscreen_result) const override
 
gfx::Rect GetHypertextRangeBoundsRect (const int start_offset, const int end_offset, const AXCoordinateSystem coordinate_system, const AXClippingBehavior clipping_behavior, AXOffscreenResult *offscreen_result) const override
 
gfx::NativeViewAccessible HitTestSync (int screen_physical_pixel_x, int screen_physical_pixel_y) const override
 
gfx::NativeViewAccessible GetFocus () override
 
bool IsMinimized () const override
 
bool IsWebContent () const override
 
AXPlatformNodeGetFromNodeID (int32_t id) override
 
AXPlatformNodeGetFromTreeIDAndNodeID (const ui::AXTreeID &ax_tree_id, int32_t id) override
 
int GetIndexInParent () override
 
bool IsTable () const override
 
std::optional< intGetTableRowCount () const override
 
std::optional< intGetTableColCount () const override
 
std::optional< intGetTableAriaColCount () const override
 
std::optional< intGetTableAriaRowCount () const override
 
std::optional< intGetTableCellCount () const override
 
std::optional< bool > GetTableHasColumnOrRowHeaderNode () const override
 
std::vector< int32_t > GetColHeaderNodeIds () const override
 
std::vector< int32_t > GetColHeaderNodeIds (int col_index) const override
 
std::vector< int32_t > GetRowHeaderNodeIds () const override
 
std::vector< int32_t > GetRowHeaderNodeIds (int row_index) const override
 
bool IsTableRow () const override
 
std::optional< intGetTableRowRowIndex () const override
 
bool IsTableCellOrHeader () const override
 
std::optional< intGetTableCellIndex () const override
 
std::optional< intGetTableCellColIndex () const override
 
std::optional< intGetTableCellRowIndex () const override
 
std::optional< intGetTableCellColSpan () const override
 
std::optional< intGetTableCellRowSpan () const override
 
std::optional< intGetTableCellAriaColIndex () const override
 
std::optional< intGetTableCellAriaRowIndex () const override
 
std::optional< int32_t > GetCellId (int row_index, int col_index) const override
 
std::optional< int32_t > CellIndexToId (int cell_index) const override
 
bool IsCellOrHeaderOfARIATable () const override
 
bool IsCellOrHeaderOfARIAGrid () const override
 
gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent () override
 
bool AccessibilityPerformAction (const AXActionData &data) override
 
std::u16string GetLocalizedRoleDescriptionForUnlabeledImage () const override
 
std::u16string GetLocalizedStringForLandmarkType () const override
 
std::u16string GetLocalizedStringForRoleDescription () const override
 
std::u16string GetLocalizedStringForImageAnnotationStatus (ax::mojom::ImageAnnotationStatus status) const override
 
std::u16string GetStyleNameAttributeAsLocalizedString () const override
 
bool ShouldIgnoreHoveredStateForTesting () override
 
const ui::AXUniqueIdGetUniqueId () const override
 
bool HasVisibleCaretOrSelection () const override
 
std::set< AXPlatformNode * > GetReverseRelations (ax::mojom::IntAttribute attr) override
 
std::set< AXPlatformNode * > GetReverseRelations (ax::mojom::IntListAttribute attr) override
 
bool IsOrderedSetItem () const override
 
bool IsOrderedSet () const override
 
std::optional< intGetPosInSet () const override
 
std::optional< intGetSetSize () const override
 
const std::vector< gfx::NativeViewAccessibleGetUIADescendants () const override
 
gfx::RectF GetLocation () const
 
int InternalChildCount () const
 
TestAXNodeWrapperInternalGetChild (int index) const
 
- Public Member Functions inherited from ui::AXPlatformNodeDelegateBase
 AXPlatformNodeDelegateBase ()
 
 ~AXPlatformNodeDelegateBase () override
 
std::u16string GetInnerText () const override
 
gfx::NativeViewAccessible GetNSWindow () override
 
gfx::NativeViewAccessible GetLowestPlatformAncestor () const override
 
bool HasModalDialog () const override
 
gfx::NativeViewAccessible GetFirstChild () override
 
gfx::NativeViewAccessible GetLastChild () override
 
gfx::NativeViewAccessible GetNextSibling () override
 
gfx::NativeViewAccessible GetPreviousSibling () override
 
bool IsChildOfLeaf () const override
 
bool IsChildOfPlainTextField () const override
 
bool IsLeaf () const override
 
bool IsToplevelBrowserWindow () override
 
gfx::NativeViewAccessible GetClosestPlatformObject () const override
 
std::unique_ptr< AXPlatformNodeDelegate::ChildIteratorChildrenBegin () override
 
std::unique_ptr< AXPlatformNodeDelegate::ChildIteratorChildrenEnd () override
 
std::string GetName () const override
 
std::u16string GetHypertext () const override
 
bool SetHypertextSelection (int start_offset, int end_offset) override
 
TextAttributeMap ComputeTextAttributeMap (const TextAttributeList &default_attributes) const override
 
std::string GetInheritedFontFamilyName () const override
 
gfx::Rect GetClippedScreenBoundsRect (AXOffscreenResult *offscreen_result=nullptr) const override
 
gfx::Rect GetUnclippedScreenBoundsRect (AXOffscreenResult *offscreen_result=nullptr) const
 
bool IsOffscreen () const override
 
bool IsText () const override
 
AXPlatformNodeGetTargetNodeForRelation (ax::mojom::IntAttribute attr) override
 
std::vector< AXPlatformNode * > GetTargetNodesForRelation (ax::mojom::IntListAttribute attr) override
 
std::u16string GetAuthorUniqueId () const override
 
std::optional< intFindTextBoundary (ax::mojom::TextBoundary boundary, int offset, ax::mojom::MoveDirection direction, ax::mojom::TextAffinity affinity) const override
 
std::string GetLanguage () const override
 
AXPlatformNodeGetTableCaption () const override
 
- Public Member Functions inherited from ui::AXPlatformNodeDelegate
virtual ~AXPlatformNodeDelegate ()=default
 
std::string ToString ()
 
std::string SubtreeToString ()
 

Static Public Member Functions

static TestAXNodeWrapperGetOrCreate (AXTree *tree, AXNode *node)
 
static void SetGlobalCoordinateOffset (const gfx::Vector2d &offset)
 
static const AXNodeGetNodeFromLastShowContextMenu ()
 
static const AXNodeGetNodeFromLastDefaultAction ()
 
static void SetNodeFromLastDefaultAction (AXNode *node)
 
static std::unique_ptr< base::AutoReset< float > > SetScaleFactor (float value)
 
static void SetGlobalIsWebContent (bool is_web_content)
 
static void SetHitTestResult (AXNode::AXID src_node_id, AXNode::AXID dst_node_id)
 
static void ClearHitTestResults ()
 

Additional Inherited Members

- Protected Member Functions inherited from ui::AXPlatformNodeDelegateBase
std::string SubtreeToStringHelper (size_t level) override
 
std::set< ui::AXPlatformNode * > GetNodesForNodeIds (const std::set< int32_t > &ids)
 
AXPlatformNodeDelegateGetParentDelegate ()
 
- Protected Member Functions inherited from ui::AXPlatformNodeDelegate
 AXPlatformNodeDelegate ()=default
 

Detailed Description

Definition at line 29 of file test_ax_node_wrapper.h.

Constructor & Destructor Documentation

◆ ~TestAXNodeWrapper()

ui::TestAXNodeWrapper::~TestAXNodeWrapper ( )
override

Definition at line 132 of file test_ax_node_wrapper.cc.

132 {
133 platform_node_->Destroy();
134}
virtual void Destroy()

Member Function Documentation

◆ AccessibilityPerformAction()

bool ui::TestAXNodeWrapper::AccessibilityPerformAction ( const AXActionData data)
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 569 of file test_ax_node_wrapper.cc.

570 {
571 switch (data.action) {
573 g_offset = gfx::Vector2d(data.target_point.x(), data.target_point.y());
574 return true;
576 int scroll_x_min =
578 int scroll_x_max =
580 int scroll_y_min =
582 int scroll_y_max =
584 int scroll_x =
585 base::ClampToRange(data.target_point.x(), scroll_x_min, scroll_x_max);
586 int scroll_y =
587 base::ClampToRange(data.target_point.y(), scroll_y_min, scroll_y_max);
588
589 ReplaceIntAttribute(node_->id(), ax::mojom::IntAttribute::kScrollX,
590 scroll_x);
591 ReplaceIntAttribute(node_->id(), ax::mojom::IntAttribute::kScrollY,
592 scroll_y);
593 return true;
594 }
597 g_offset = gfx::Vector2d(-offset.x(), -offset.y());
598 return true;
599 }
600
602 // If a default action such as a click is performed on an element, it
603 // could result in a selected state change. In which case, the element's
604 // selected state no longer comes from focus action, so we should set
605 // |kSelectedFromFocus| to false.
606 if (GetData().HasBoolAttribute(
609 false);
610
611 switch (GetData().role) {
614 bool current_value =
616 ReplaceBoolAttribute(ax::mojom::BoolAttribute::kSelected,
617 !current_value);
618 break;
619 }
622 if (GetData().GetCheckedState() == ax::mojom::CheckedState::kTrue)
623 ReplaceIntAttribute(
625 static_cast<int32_t>(ax::mojom::CheckedState::kFalse));
626 else if (GetData().GetCheckedState() ==
628 ReplaceIntAttribute(
630 static_cast<int32_t>(ax::mojom::CheckedState::kTrue));
631 break;
632 }
633 default:
634 break;
635 }
637 return true;
638 }
639
642 ReplaceFloatAttribute(ax::mojom::FloatAttribute::kValueForRange,
643 std::stof(data.value));
644 } else if (GetData().role == ax::mojom::Role::kTextField) {
645 ReplaceStringAttribute(ax::mojom::StringAttribute::kValue, data.value);
646 }
647 return true;
648
650 ReplaceIntAttribute(data.anchor_node_id,
652 data.anchor_offset);
653 ReplaceIntAttribute(data.focus_node_id,
655 data.focus_offset);
656 ReplaceTreeDataTextSelection(data.anchor_node_id, data.anchor_offset,
657 data.focus_node_id, data.focus_offset);
658 return true;
659 }
660
662 g_focused_node_in_tree[tree_] = node_;
663
664 // The platform has select follows focus behavior:
665 // https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_selection_follows_focus
666 // For test purpose, we support select follows focus for all elements, and
667 // not just single-selection container elements.
668 if (SupportsSelected(GetData().role)) {
669 ReplaceBoolAttribute(ax::mojom::BoolAttribute::kSelected, true);
671 true);
672 }
673
674 return true;
675 }
676
678 g_node_from_last_show_context_menu = node_;
679 return true;
680
681 default:
682 return true;
683 }
684}
Vector2dF OffsetFromOrigin() const
Definition rect_f.h:77
AXID id() const
Definition ax_node.h:110
const AXNodeData & data() const
Definition ax_node.h:112
const AXNodeData & GetData() const override
static void SetNodeFromLastDefaultAction(AXNode *node)
constexpr const T & ClampToRange(const T &value, const T &min, const T &max)
Definition ranges.h:15
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
Definition switches.h:41
bool SupportsSelected(const ax::mojom::Role role)
bool IsRangeValueSupported(const ax::mojom::Role role)
Point offset
AXRelativeBounds relative_bounds
bool GetBoolAttribute(ax::mojom::BoolAttribute attribute) const
int GetIntAttribute(ax::mojom::IntAttribute attribute) const

◆ ax_platform_node()

AXPlatformNode * ui::TestAXNodeWrapper::ax_platform_node ( ) const
inline

Definition at line 64 of file test_ax_node_wrapper.h.

64{ return platform_node_; }

◆ BuildAllWrappers()

void ui::TestAXNodeWrapper::BuildAllWrappers ( AXTree tree,
AXNode node 
)

Definition at line 333 of file test_ax_node_wrapper.cc.

333 {
334 for (auto* child : node->children()) {
336 BuildAllWrappers(tree, child);
337 }
338}
static TestAXNodeWrapper * GetOrCreate(AXTree *tree, AXNode *node)
void BuildAllWrappers(AXTree *tree, AXNode *node)

◆ CellIndexToId()

std::optional< int32_t > ui::TestAXNodeWrapper::CellIndexToId ( int  cell_index) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 554 of file test_ax_node_wrapper.cc.

554 {
555 AXNode* cell = node_->GetTableCellFromIndex(cell_index);
556 if (!cell)
557 return std::nullopt;
558 return cell->id();
559}
AXNode * GetTableCellFromIndex(int index) const
Definition ax_node.cc:588

◆ ChildAtIndex()

gfx::NativeViewAccessible ui::TestAXNodeWrapper::ChildAtIndex ( int  index)
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 171 of file test_ax_node_wrapper.cc.

171 {
172 TestAXNodeWrapper* child_wrapper = InternalGetChild(index);
173 return child_wrapper
174 ? child_wrapper->ax_platform_node()->GetNativeViewAccessible()
175 : nullptr;
176}
TestAXNodeWrapper * InternalGetChild(int index) const

◆ ClearHitTestResults()

void ui::TestAXNodeWrapper::ClearHitTestResults ( )
static

Definition at line 128 of file test_ax_node_wrapper.cc.

128 {
129 g_hit_test_result.clear();
130}

◆ CreateTextPositionAt()

AXNodePosition::AXPositionInstance ui::TestAXNodeWrapper::CreateTextPositionAt ( int  offset) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 148 of file test_ax_node_wrapper.cc.

149 {
151 GetTreeData().tree_id, node_->id(), offset,
153}
static AXPositionInstance CreateTextPosition(AXTreeID tree_id, AXNode::AXID anchor_id, int text_offset, ax::mojom::TextAffinity affinity)
const AXTreeData & GetTreeData() const override

◆ GetBoundsRect()

gfx::Rect ui::TestAXNodeWrapper::GetBoundsRect ( const AXCoordinateSystem  coordinate_system,
const AXClippingBehavior  clipping_behavior,
AXOffscreenResult offscreen_result 
) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 178 of file test_ax_node_wrapper.cc.

181 {
182 switch (coordinate_system) {
184 // For unit testing purposes, assume a device scale factor of 1 and fall
185 // through.
187 // We could optionally add clipping here if ever needed.
189 bounds.Offset(g_offset);
190
191 // For test behavior only, for bounds that are offscreen we currently do
192 // not apply clipping to the bounds but we still return the offscreen
193 // status.
194 if (offscreen_result) {
195 *offscreen_result = DetermineOffscreenResult(bounds);
196 }
197
198 return gfx::ToEnclosingRect(bounds);
199 }
203 return gfx::Rect();
204 }
205}
gfx::RectF GetLocation() const
Optional< SkRect > bounds
Definition SkRecords.h:189
Rect ToEnclosingRect(const RectF &r)
#define BASE_UNREACHABLE()
Definition logging.h:69

◆ GetCellId()

std::optional< int32_t > ui::TestAXNodeWrapper::GetCellId ( int  row_index,
int  col_index 
) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 541 of file test_ax_node_wrapper.cc.

542 {
543 AXNode* cell = node_->GetTableCellFromCoords(row_index, col_index);
544 if (!cell)
545 return std::nullopt;
546 return cell->id();
547}
AXNode * GetTableCellFromCoords(int row_index, int col_index) const
Definition ax_node.cc:611

◆ GetChildCount()

int ui::TestAXNodeWrapper::GetChildCount ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 167 of file test_ax_node_wrapper.cc.

167 {
168 return InternalChildCount();
169}

◆ GetColHeaderNodeIds() [1/2]

std::vector< AXNode::AXID > ui::TestAXNodeWrapper::GetColHeaderNodeIds ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 483 of file test_ax_node_wrapper.cc.

483 {
484 return node_->GetTableColHeaderNodeIds();
485}
std::vector< AXNode::AXID > GetTableColHeaderNodeIds() const
Definition ax_node.cc:628

◆ GetColHeaderNodeIds() [2/2]

std::vector< AXNode::AXID > ui::TestAXNodeWrapper::GetColHeaderNodeIds ( int  col_index) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 487 of file test_ax_node_wrapper.cc.

488 {
489 return node_->GetTableColHeaderNodeIds(col_index);
490}

◆ GetData()

const AXNodeData & ui::TestAXNodeWrapper::GetData ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 136 of file test_ax_node_wrapper.cc.

136 {
137 return node_->data();
138}

◆ GetFocus()

gfx::NativeViewAccessible ui::TestAXNodeWrapper::GetFocus ( )
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 313 of file test_ax_node_wrapper.cc.

313 {
314 auto focused = g_focused_node_in_tree.find(tree_);
315 if (focused != g_focused_node_in_tree.end() &&
316 focused->second->IsDescendantOf(node_)) {
317 return GetOrCreate(tree_, focused->second)
320 }
321 return nullptr;
322}
virtual gfx::NativeViewAccessible GetNativeViewAccessible()=0
AXPlatformNode * ax_platform_node() const

◆ GetFromNodeID()

AXPlatformNode * ui::TestAXNodeWrapper::GetFromNodeID ( int32_t  id)
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 344 of file test_ax_node_wrapper.cc.

344 {
345 // Force creating all of the wrappers for this tree.
346 BuildAllWrappers(tree_, node_);
347
348 const auto iter = g_node_id_to_wrapper_map.find(id);
349 if (iter != g_node_id_to_wrapper_map.end())
350 return iter->second->ax_platform_node();
351
352 return nullptr;
353}

◆ GetFromTreeIDAndNodeID()

AXPlatformNode * ui::TestAXNodeWrapper::GetFromTreeIDAndNodeID ( const ui::AXTreeID ax_tree_id,
int32_t  id 
)
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 355 of file test_ax_node_wrapper.cc.

357 {
358 // TestAXNodeWrapper only supports one accessibility tree.
359 // Additional work would need to be done to support multiple trees.
360 BASE_CHECK(GetTreeData().tree_id == ax_tree_id);
361 return GetFromNodeID(id);
362}
AXPlatformNode * GetFromNodeID(int32_t id) override
#define BASE_CHECK(condition)
Definition logging.h:56

◆ GetHypertextRangeBoundsRect()

gfx::Rect ui::TestAXNodeWrapper::GetHypertextRangeBoundsRect ( const int  start_offset,
const int  end_offset,
const AXCoordinateSystem  coordinate_system,
const AXClippingBehavior  clipping_behavior,
AXOffscreenResult offscreen_result 
) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 252 of file test_ax_node_wrapper.cc.

257 {
258 switch (coordinate_system) {
260 // For unit testing purposes, assume a device scale factor of 1 and fall
261 // through.
263 // Ignoring start, len, and clipped, as there's no clean way to map these
264 // via unit tests.
266 bounds.Offset(g_offset);
267 return gfx::ToEnclosingRect(bounds);
268 }
272 return gfx::Rect();
273 }
274}

◆ GetIndexInParent()

int ui::TestAXNodeWrapper::GetIndexInParent ( )
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 364 of file test_ax_node_wrapper.cc.

364 {
365 return node_ ? static_cast<int>(node_->GetUnignoredIndexInParent()) : -1;
366}
size_t GetUnignoredIndexInParent() const
Definition ax_node.cc:66

◆ GetInnerTextRangeBoundsRect()

gfx::Rect ui::TestAXNodeWrapper::GetInnerTextRangeBoundsRect ( const int  start_offset,
const int  end_offset,
const AXCoordinateSystem  coordinate_system,
const AXClippingBehavior  clipping_behavior,
AXOffscreenResult offscreen_result 
) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 207 of file test_ax_node_wrapper.cc.

212 {
213 switch (coordinate_system) {
215 // For unit testing purposes, assume a device scale factor of 1 and fall
216 // through.
219 // This implementation currently only deals with text node that has role
220 // kInlineTextBox and kStaticText.
221 // For test purposes, assume node with kStaticText always has a single
222 // child with role kInlineTextBox.
224 bounds = GetInlineTextRect(start_offset, end_offset);
225 } else if (GetData().role == ax::mojom::Role::kStaticText &&
226 InternalChildCount() > 0) {
227 TestAXNodeWrapper* child = InternalGetChild(0);
228 if (child != nullptr &&
229 child->GetData().role == ax::mojom::Role::kInlineTextBox) {
230 bounds = child->GetInlineTextRect(start_offset, end_offset);
231 }
232 }
233
234 bounds.Offset(g_offset);
235
236 // For test behavior only, for bounds that are offscreen we currently do
237 // not apply clipping to the bounds but we still return the offscreen
238 // status.
239 if (offscreen_result) {
240 *offscreen_result = DetermineOffscreenResult(bounds);
241 }
242
243 return gfx::ToEnclosingRect(bounds);
244 }
248 return gfx::Rect();
249 }
250}

◆ GetLocalizedRoleDescriptionForUnlabeledImage()

std::u16string ui::TestAXNodeWrapper::GetLocalizedRoleDescriptionForUnlabeledImage ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 686 of file test_ax_node_wrapper.cc.

687 {
688 return base::ASCIIToUTF16("Unlabeled image");
689}
std::u16string ASCIIToUTF16(std::string src)

◆ GetLocalizedStringForImageAnnotationStatus()

std::u16string ui::TestAXNodeWrapper::GetLocalizedStringForImageAnnotationStatus ( ax::mojom::ImageAnnotationStatus  status) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 812 of file test_ax_node_wrapper.cc.

813 {
814 switch (status) {
816 return base::ASCIIToUTF16(
817 "To get missing image descriptions, open the context menu.");
819 return base::ASCIIToUTF16("Getting description...");
821 return base::ASCIIToUTF16(
822 "Appears to contain adult content. No description available.");
825 return base::ASCIIToUTF16("No description available.");
831 return std::u16string();
832 }
833
835 return std::u16string();
836}

◆ GetLocalizedStringForLandmarkType()

std::u16string ui::TestAXNodeWrapper::GetLocalizedStringForLandmarkType ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 691 of file test_ax_node_wrapper.cc.

691 {
692 const AXNodeData& data = GetData();
693 switch (data.role) {
696 return base::ASCIIToUTF16("banner");
697
699 return base::ASCIIToUTF16("complementary");
700
703 return base::ASCIIToUTF16("content information");
704
707 if (data.HasStringAttribute(ax::mojom::StringAttribute::kName))
708 return base::ASCIIToUTF16("region");
709
710 default:
711 return {};
712 }
713}

◆ GetLocalizedStringForRoleDescription()

std::u16string ui::TestAXNodeWrapper::GetLocalizedStringForRoleDescription ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 715 of file test_ax_node_wrapper.cc.

715 {
716 const AXNodeData& data = GetData();
717
718 switch (data.role) {
720 return base::ASCIIToUTF16("article");
721
723 return base::ASCIIToUTF16("audio");
724
726 return base::ASCIIToUTF16("code");
727
729 return base::ASCIIToUTF16("color picker");
730
732 return base::ASCIIToUTF16("content information");
733
735 return base::ASCIIToUTF16("date picker");
736
738 std::string input_type;
739 if (data.GetStringAttribute(ax::mojom::StringAttribute::kInputType,
740 &input_type)) {
741 if (input_type == "datetime-local") {
742 return base::ASCIIToUTF16("local date and time picker");
743 } else if (input_type == "week") {
744 return base::ASCIIToUTF16("week picker");
745 }
746 }
747 return {};
748 }
749
751 return base::ASCIIToUTF16("details");
752
754 return base::ASCIIToUTF16("emphasis");
755
757 return base::ASCIIToUTF16("figure");
758
761 return base::ASCIIToUTF16("footer");
762
765 return base::ASCIIToUTF16("header");
766
768 return base::ASCIIToUTF16("highlight");
769
771 return base::ASCIIToUTF16("meter");
772
774 return base::ASCIIToUTF16("search box");
775
777 if (data.HasStringAttribute(ax::mojom::StringAttribute::kName))
778 return base::ASCIIToUTF16("section");
779
780 return {};
781 }
782
784 return base::ASCIIToUTF16("output");
785
787 return base::ASCIIToUTF16("strong");
788
790 std::string input_type;
791 if (data.GetStringAttribute(ax::mojom::StringAttribute::kInputType,
792 &input_type)) {
793 if (input_type == "email") {
794 return base::ASCIIToUTF16("email");
795 } else if (input_type == "tel") {
796 return base::ASCIIToUTF16("telephone");
797 } else if (input_type == "url") {
798 return base::ASCIIToUTF16("url");
799 }
800 }
801 return {};
802 }
803
805 return base::ASCIIToUTF16("time");
806
807 default:
808 return {};
809 }
810}

◆ GetLocation()

gfx::RectF ui::TestAXNodeWrapper::GetLocation ( ) const

Definition at line 915 of file test_ax_node_wrapper.cc.

915 {
917}

◆ GetNativeViewAccessible()

gfx::NativeViewAccessible ui::TestAXNodeWrapper::GetNativeViewAccessible ( )
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 155 of file test_ax_node_wrapper.cc.

155 {
157}

◆ GetNodeFromLastDefaultAction()

const AXNode * ui::TestAXNodeWrapper::GetNodeFromLastDefaultAction ( )
static

Definition at line 101 of file test_ax_node_wrapper.cc.

101 {
102 return g_node_from_last_default_action;
103}

◆ GetNodeFromLastShowContextMenu()

const AXNode * ui::TestAXNodeWrapper::GetNodeFromLastShowContextMenu ( )
static

Definition at line 96 of file test_ax_node_wrapper.cc.

96 {
97 return g_node_from_last_show_context_menu;
98}

◆ GetOrCreate()

TestAXNodeWrapper * ui::TestAXNodeWrapper::GetOrCreate ( AXTree tree,
AXNode node 
)
static

Definition at line 76 of file test_ax_node_wrapper.cc.

76 {
77 if (!tree || !node)
78 return nullptr;
79
80 if (!tree->HasObserver(&g_ax_tree_observer))
81 tree->AddObserver(&g_ax_tree_observer);
82 auto iter = g_node_id_to_wrapper_map.find(node->id());
83 if (iter != g_node_id_to_wrapper_map.end())
84 return iter->second;
85 TestAXNodeWrapper* wrapper = new TestAXNodeWrapper(tree, node);
86 g_node_id_to_wrapper_map[node->id()] = wrapper;
87 return wrapper;
88}

◆ GetParent()

gfx::NativeViewAccessible ui::TestAXNodeWrapper::GetParent ( )
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 159 of file test_ax_node_wrapper.cc.

159 {
160 TestAXNodeWrapper* parent_wrapper =
161 GetOrCreate(tree_, node_->GetUnignoredParent());
162 return parent_wrapper
163 ? parent_wrapper->ax_platform_node()->GetNativeViewAccessible()
164 : nullptr;
165}
AXNode * GetUnignoredParent() const
Definition ax_node.cc:58

◆ GetPosInSet()

std::optional< int > ui::TestAXNodeWrapper::GetPosInSet ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 907 of file test_ax_node_wrapper.cc.

907 {
908 return node_->GetPosInSet();
909}
std::optional< int > GetPosInSet()
Definition ax_node.cc:949

◆ GetReverseRelations() [1/2]

std::set< AXPlatformNode * > ui::TestAXNodeWrapper::GetReverseRelations ( ax::mojom::IntAttribute  attr)
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 874 of file test_ax_node_wrapper.cc.

875 {
877 return GetNodesForNodeIds(tree_->GetReverseRelations(attr, GetData().id));
878}
std::set< ui::AXPlatformNode * > GetNodesForNodeIds(const std::set< int32_t > &ids)
std::set< int32_t > GetReverseRelations(ax::mojom::IntAttribute attr, int32_t dst_id) const
Definition ax_tree.cc:922
bool IsNodeIdIntAttribute(ax::mojom::IntAttribute attr)
#define BASE_DCHECK(condition)
Definition logging.h:63

◆ GetReverseRelations() [2/2]

std::set< AXPlatformNode * > ui::TestAXNodeWrapper::GetReverseRelations ( ax::mojom::IntListAttribute  attr)
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 880 of file test_ax_node_wrapper.cc.

881 {
883 return GetNodesForNodeIds(tree_->GetReverseRelations(attr, GetData().id));
884}
bool IsNodeIdIntListAttribute(ax::mojom::IntListAttribute attr)

◆ GetRowHeaderNodeIds() [1/2]

std::vector< AXNode::AXID > ui::TestAXNodeWrapper::GetRowHeaderNodeIds ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 492 of file test_ax_node_wrapper.cc.

492 {
493 return node_->GetTableCellRowHeaderNodeIds();
494}
std::vector< AXNode::AXID > GetTableCellRowHeaderNodeIds() const
Definition ax_node.cc:864

◆ GetRowHeaderNodeIds() [2/2]

std::vector< AXNode::AXID > ui::TestAXNodeWrapper::GetRowHeaderNodeIds ( int  row_index) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 496 of file test_ax_node_wrapper.cc.

497 {
498 return node_->GetTableRowHeaderNodeIds(row_index);
499}
std::vector< AXNode::AXID > GetTableRowHeaderNodeIds(int row_index) const
Definition ax_node.cc:657

◆ GetSetSize()

std::optional< int > ui::TestAXNodeWrapper::GetSetSize ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 911 of file test_ax_node_wrapper.cc.

911 {
912 return node_->GetSetSize();
913}
std::optional< int > GetSetSize()
Definition ax_node.cc:954

◆ GetStyleNameAttributeAsLocalizedString()

std::u16string ui::TestAXNodeWrapper::GetStyleNameAttributeAsLocalizedString ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 838 of file test_ax_node_wrapper.cc.

839 {
840 AXNode* current_node = node_;
841 while (current_node) {
842 if (current_node->data().role == ax::mojom::Role::kMark)
843 return base::ASCIIToUTF16("mark");
844 current_node = current_node->parent();
845 }
846 return std::u16string();
847}

◆ GetTableAriaColCount()

std::optional< int > ui::TestAXNodeWrapper::GetTableAriaColCount ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 470 of file test_ax_node_wrapper.cc.

470 {
471 return node_->GetTableAriaColCount();
472}
std::optional< int > GetTableAriaColCount() const
Definition ax_node.cc:558

◆ GetTableAriaRowCount()

std::optional< int > ui::TestAXNodeWrapper::GetTableAriaRowCount ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 466 of file test_ax_node_wrapper.cc.

466 {
467 return node_->GetTableAriaRowCount();
468}
std::optional< int > GetTableAriaRowCount() const
Definition ax_node.cc:565

◆ GetTableCellAriaColIndex()

std::optional< int > ui::TestAXNodeWrapper::GetTableCellAriaColIndex ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 533 of file test_ax_node_wrapper.cc.

533 {
534 return node_->GetTableCellAriaColIndex();
535}
std::optional< int > GetTableCellAriaColIndex() const
Definition ax_node.cc:822

◆ GetTableCellAriaRowIndex()

std::optional< int > ui::TestAXNodeWrapper::GetTableCellAriaRowIndex ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 537 of file test_ax_node_wrapper.cc.

537 {
538 return node_->GetTableCellAriaRowIndex();
539}
std::optional< int > GetTableCellAriaRowIndex() const
Definition ax_node.cc:834

◆ GetTableCellColIndex()

std::optional< int > ui::TestAXNodeWrapper::GetTableCellColIndex ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 517 of file test_ax_node_wrapper.cc.

517 {
518 return node_->GetTableCellColIndex();
519}
std::optional< int > GetTableCellColIndex() const
Definition ax_node.cc:772

◆ GetTableCellColSpan()

std::optional< int > ui::TestAXNodeWrapper::GetTableCellColSpan ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 525 of file test_ax_node_wrapper.cc.

525 {
526 return node_->GetTableCellColSpan();
527}
std::optional< int > GetTableCellColSpan() const
Definition ax_node.cc:796

◆ GetTableCellCount()

std::optional< int > ui::TestAXNodeWrapper::GetTableCellCount ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 474 of file test_ax_node_wrapper.cc.

474 {
475 return node_->GetTableCellCount();
476}
std::optional< int > GetTableCellCount() const
Definition ax_node.cc:572

◆ GetTableCellIndex()

std::optional< int > ui::TestAXNodeWrapper::GetTableCellIndex ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 513 of file test_ax_node_wrapper.cc.

513 {
514 return node_->GetTableCellIndex();
515}
std::optional< int > GetTableCellIndex() const
Definition ax_node.cc:758

◆ GetTableCellRowIndex()

std::optional< int > ui::TestAXNodeWrapper::GetTableCellRowIndex ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 521 of file test_ax_node_wrapper.cc.

521 {
522 return node_->GetTableCellRowIndex();
523}
std::optional< int > GetTableCellRowIndex() const
Definition ax_node.cc:784

◆ GetTableCellRowSpan()

std::optional< int > ui::TestAXNodeWrapper::GetTableCellRowSpan ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 529 of file test_ax_node_wrapper.cc.

529 {
530 return node_->GetTableCellRowSpan();
531}
std::optional< int > GetTableCellRowSpan() const
Definition ax_node.cc:809

◆ GetTableColCount()

std::optional< int > ui::TestAXNodeWrapper::GetTableColCount ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 462 of file test_ax_node_wrapper.cc.

462 {
463 return node_->GetTableColCount();
464}
std::optional< int > GetTableColCount() const
Definition ax_node.cc:544

◆ GetTableHasColumnOrRowHeaderNode()

std::optional< bool > ui::TestAXNodeWrapper::GetTableHasColumnOrRowHeaderNode ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 478 of file test_ax_node_wrapper.cc.

479 {
480 return node_->GetTableHasColumnOrRowHeaderNode();
481}
std::optional< bool > GetTableHasColumnOrRowHeaderNode() const
Definition ax_node.cc:580

◆ GetTableRowCount()

std::optional< int > ui::TestAXNodeWrapper::GetTableRowCount ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 458 of file test_ax_node_wrapper.cc.

458 {
459 return node_->GetTableRowCount();
460}
std::optional< int > GetTableRowCount() const
Definition ax_node.cc:551

◆ GetTableRowRowIndex()

std::optional< int > ui::TestAXNodeWrapper::GetTableRowRowIndex ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 505 of file test_ax_node_wrapper.cc.

505 {
506 return node_->GetTableRowRowIndex();
507}
std::optional< int > GetTableRowRowIndex() const
Definition ax_node.cc:695

◆ GetTargetForNativeAccessibilityEvent()

gfx::AcceleratedWidget ui::TestAXNodeWrapper::GetTargetForNativeAccessibilityEvent ( )
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 550 of file test_ax_node_wrapper.cc.

550 {
551 return native_event_target_;
552}

◆ GetTreeData()

const AXTreeData & ui::TestAXNodeWrapper::GetTreeData ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 140 of file test_ax_node_wrapper.cc.

140 {
141 return tree_->data();
142}
const AXTreeData & data() const
Definition ax_tree.h:59

◆ GetUIADescendants()

const std::vector< gfx::NativeViewAccessible > ui::TestAXNodeWrapper::GetUIADescendants ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 949 of file test_ax_node_wrapper.cc.

949 {
950 std::vector<gfx::NativeViewAccessible> descendants;
951 UIADescendants(node_, &descendants);
952 return descendants;
953}

◆ GetUnignoredSelection()

const AXTree::Selection ui::TestAXNodeWrapper::GetUnignoredSelection ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 144 of file test_ax_node_wrapper.cc.

144 {
145 return tree_->GetUnignoredSelection();
146}
Selection GetUnignoredSelection() const override
Definition ax_tree.cc:2345

◆ GetUniqueId()

const ui::AXUniqueId & ui::TestAXNodeWrapper::GetUniqueId ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 886 of file test_ax_node_wrapper.cc.

886 {
887 return unique_id_;
888}

◆ HasVisibleCaretOrSelection()

bool ui::TestAXNodeWrapper::HasVisibleCaretOrSelection ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 853 of file test_ax_node_wrapper.cc.

853 {
854 ui::AXTree::Selection unignored_selection = GetUnignoredSelection();
855 int32_t focus_id = unignored_selection.focus_object_id;
856 AXNode* focus_object = tree_->GetFromId(focus_id);
857 if (!focus_object)
858 return false;
859
860 // Selection or caret will be visible in a focused editable area.
861 if (GetData().HasState(ax::mojom::State::kEditable)) {
862 return GetData().IsPlainTextField() ? focus_object == node_
863 : focus_object->IsDescendantOf(node_);
864 }
865
866 // The selection will be visible in non-editable content only if it is not
867 // collapsed into a caret.
868 return (focus_id != unignored_selection.anchor_object_id ||
869 unignored_selection.focus_offset !=
870 unignored_selection.anchor_offset) &&
871 focus_object->IsDescendantOf(node_);
872}
bool IsDescendantOf(const AXNode *ancestor) const
Definition ax_node.cc:407
AXNode * GetFromId(int32_t id) const override
Definition ax_tree.cc:728
const AXTree::Selection GetUnignoredSelection() const override
bool IsPlainTextField() const

◆ HitTestSync()

gfx::NativeViewAccessible ui::TestAXNodeWrapper::HitTestSync ( int  screen_physical_pixel_x,
int  screen_physical_pixel_y 
) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 302 of file test_ax_node_wrapper.cc.

304 {
305 const TestAXNodeWrapper* wrapper =
306 const_cast<TestAXNodeWrapper*>(this)->HitTestSyncInternal(
307 screen_physical_pixel_x / g_scale_factor,
308 screen_physical_pixel_y / g_scale_factor);
309 return wrapper ? wrapper->ax_platform_node()->GetNativeViewAccessible()
310 : nullptr;
311}

◆ InternalChildCount()

int ui::TestAXNodeWrapper::InternalChildCount ( ) const

Definition at line 919 of file test_ax_node_wrapper.cc.

919 {
920 return static_cast<int>(node_->GetUnignoredChildCount());
921}
size_t GetUnignoredChildCount() const
Definition ax_node.cc:37

◆ InternalGetChild()

TestAXNodeWrapper * ui::TestAXNodeWrapper::InternalGetChild ( int  index) const

Definition at line 923 of file test_ax_node_wrapper.cc.

923 {
924 BASE_CHECK(index >= 0);
926 return GetOrCreate(
927 tree_, node_->GetUnignoredChildAtIndex(static_cast<size_t>(index)));
928}
AXNode * GetUnignoredChildAtIndex(size_t index) const
Definition ax_node.cc:47

◆ IsCellOrHeaderOfARIAGrid()

bool ui::TestAXNodeWrapper::IsCellOrHeaderOfARIAGrid ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 565 of file test_ax_node_wrapper.cc.

565 {
566 return node_->IsCellOrHeaderOfARIAGrid();
567}
bool IsCellOrHeaderOfARIAGrid() const
Definition ax_node.cc:895

◆ IsCellOrHeaderOfARIATable()

bool ui::TestAXNodeWrapper::IsCellOrHeaderOfARIATable ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 561 of file test_ax_node_wrapper.cc.

561 {
562 return node_->IsCellOrHeaderOfARIATable();
563}
bool IsCellOrHeaderOfARIATable() const
Definition ax_node.cc:882

◆ IsMinimized()

bool ui::TestAXNodeWrapper::IsMinimized ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 324 of file test_ax_node_wrapper.cc.

324 {
325 return minimized_;
326}

◆ IsOrderedSet()

bool ui::TestAXNodeWrapper::IsOrderedSet ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 903 of file test_ax_node_wrapper.cc.

903 {
904 return node_->IsOrderedSet();
905}
bool IsOrderedSet() const
Definition ax_node.cc:944

◆ IsOrderedSetItem()

bool ui::TestAXNodeWrapper::IsOrderedSetItem ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 899 of file test_ax_node_wrapper.cc.

899 {
900 return node_->IsOrderedSetItem();
901}
bool IsOrderedSetItem() const
Definition ax_node.cc:940

◆ IsTable()

bool ui::TestAXNodeWrapper::IsTable ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 454 of file test_ax_node_wrapper.cc.

454 {
455 return node_->IsTable();
456}
bool IsTable() const
Definition ax_node.cc:540

◆ IsTableCellOrHeader()

bool ui::TestAXNodeWrapper::IsTableCellOrHeader ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 509 of file test_ax_node_wrapper.cc.

509 {
510 return node_->IsTableCellOrHeader();
511}
bool IsTableCellOrHeader() const
Definition ax_node.cc:754

◆ IsTableRow()

bool ui::TestAXNodeWrapper::IsTableRow ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 501 of file test_ax_node_wrapper.cc.

501 {
502 return node_->IsTableRow();
503}
bool IsTableRow() const
Definition ax_node.cc:691

◆ IsWebContent()

bool ui::TestAXNodeWrapper::IsWebContent ( ) const
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 328 of file test_ax_node_wrapper.cc.

328 {
329 return g_is_web_content;
330}

◆ ResetNativeEventTarget()

void ui::TestAXNodeWrapper::ResetNativeEventTarget ( )

Definition at line 340 of file test_ax_node_wrapper.cc.

340 {
341 native_event_target_ = gfx::kNullAcceleratedWidget;
342}

◆ set_minimized()

void ui::TestAXNodeWrapper::set_minimized ( bool  minimized)
inline

Definition at line 65 of file test_ax_node_wrapper.h.

65{ minimized_ = minimized; }

◆ SetGlobalCoordinateOffset()

void ui::TestAXNodeWrapper::SetGlobalCoordinateOffset ( const gfx::Vector2d offset)
static

Definition at line 91 of file test_ax_node_wrapper.cc.

91 {
92 g_offset = offset;
93}

◆ SetGlobalIsWebContent()

void ui::TestAXNodeWrapper::SetGlobalIsWebContent ( bool  is_web_content)
static

Definition at line 117 of file test_ax_node_wrapper.cc.

117 {
118 g_is_web_content = is_web_content;
119}

◆ SetHitTestResult()

void ui::TestAXNodeWrapper::SetHitTestResult ( AXNode::AXID  src_node_id,
AXNode::AXID  dst_node_id 
)
static

Definition at line 122 of file test_ax_node_wrapper.cc.

123 {
124 g_hit_test_result[src_node_id] = dst_node_id;
125}

◆ SetNodeFromLastDefaultAction()

void ui::TestAXNodeWrapper::SetNodeFromLastDefaultAction ( AXNode node)
static

Definition at line 106 of file test_ax_node_wrapper.cc.

106 {
107 g_node_from_last_default_action = node;
108}

◆ SetScaleFactor()

std::unique_ptr< base::AutoReset< float > > ui::TestAXNodeWrapper::SetScaleFactor ( float  value)
static

Definition at line 111 of file test_ax_node_wrapper.cc.

112 {
113 return std::make_unique<base::AutoReset<float>>(&g_scale_factor, value);
114}
uint8_t value

◆ ShouldIgnoreHoveredStateForTesting()

bool ui::TestAXNodeWrapper::ShouldIgnoreHoveredStateForTesting ( )
overridevirtual

Reimplemented from ui::AXPlatformNodeDelegateBase.

Definition at line 849 of file test_ax_node_wrapper.cc.

849 {
850 return true;
851}

The documentation for this class was generated from the following files: