Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
test_ax_node_helper.h
Go to the documentation of this file.
1// Copyright 2020 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef UI_ACCESSIBILITY_TEST_AX_NODE_HELPER_H_
6#define UI_ACCESSIBILITY_TEST_AX_NODE_HELPER_H_
7
10#include "ax_node.h"
11#include "ax_offscreen_result.h"
12#include "ax_tree.h"
13
14namespace ui {
15
16// For testing, a TestAXNodeHelper wraps an AXNode. This is a simple
17// version of TestAXNodeWrapper.
19 public:
20 // Create TestAXNodeHelper instances on-demand from an AXTree and AXNode.
21 static TestAXNodeHelper* GetOrCreate(AXTree* tree, AXNode* node);
23
24 gfx::Rect GetBoundsRect(const AXCoordinateSystem coordinate_system,
25 const AXClippingBehavior clipping_behavior,
26 AXOffscreenResult* offscreen_result) const;
28 const int start_offset,
29 const int end_offset,
30 const AXCoordinateSystem coordinate_system,
31 const AXClippingBehavior clipping_behavior,
32 AXOffscreenResult* offscreen_result) const;
33
34 private:
35 TestAXNodeHelper(AXTree* tree, AXNode* node);
36 int InternalChildCount() const;
37 TestAXNodeHelper* InternalGetChild(int index) const;
38 const AXNodeData& GetData() const;
39 gfx::RectF GetLocation() const;
40 gfx::RectF GetInlineTextRect(const int start_offset,
41 const int end_offset) const;
42 AXOffscreenResult DetermineOffscreenResult(gfx::RectF bounds) const;
43
44 AXTree* tree_;
45 AXNode* node_;
46};
47
48} // namespace ui
49
50#endif // UI_ACCESSIBILITY_TEST_AX_NODE_HELPER_H_
gfx::Rect GetBoundsRect(const AXCoordinateSystem coordinate_system, const AXClippingBehavior clipping_behavior, AXOffscreenResult *offscreen_result) const
gfx::Rect GetInnerTextRangeBoundsRect(const int start_offset, const int end_offset, const AXCoordinateSystem coordinate_system, const AXClippingBehavior clipping_behavior, AXOffscreenResult *offscreen_result) const
static TestAXNodeHelper * GetOrCreate(AXTree *tree, AXNode *node)