Flutter Engine
The Flutter Engine
ax_platform_node_unittest.h
Go to the documentation of this file.
1// Copyright 2017 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_PLATFORM_AX_PLATFORM_NODE_UNITTEST_H_
6#define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_UNITTEST_H_
7
8#include "gtest/gtest.h"
9
10#include "ax/ax_enums.h"
11#include "ax/ax_node.h"
12#include "ax/ax_node_data.h"
13#include "ax/ax_tree_id.h"
14#include "ax/ax_tree_update.h"
16
17namespace ui {
18
19class AXPlatformNodeTest : public testing::Test, public TestAXTreeManager {
20 public:
25
26 protected:
27 // Initialize given an AXTreeUpdate.
28 void Init(const AXTreeUpdate& initial_state);
29
30 // Convenience functions to initialize directly from a few AXNodeData objects.
31 void Init(const ui::AXNodeData& node1,
32 const ui::AXNodeData& node2 = ui::AXNodeData(),
33 const ui::AXNodeData& node3 = ui::AXNodeData(),
34 const ui::AXNodeData& node4 = ui::AXNodeData(),
35 const ui::AXNodeData& node5 = ui::AXNodeData(),
36 const ui::AXNodeData& node6 = ui::AXNodeData(),
37 const ui::AXNodeData& node7 = ui::AXNodeData(),
38 const ui::AXNodeData& node8 = ui::AXNodeData(),
39 const ui::AXNodeData& node9 = ui::AXNodeData(),
40 const ui::AXNodeData& node10 = ui::AXNodeData(),
41 const ui::AXNodeData& node11 = ui::AXNodeData(),
42 const ui::AXNodeData& node12 = ui::AXNodeData());
43
45 AXTreeUpdate BuildTextFieldWithSelectionRange(int32_t start, int32_t stop);
48 int32_t end);
51
53 bool option_1_is_selected,
54 bool option_2_is_selected,
55 bool option_3_is_selected,
56 const std::vector<ax::mojom::State>& additional_state);
57};
58
59} // namespace ui
60
61#endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_UNITTEST_H_
AXPlatformNodeTest & operator=(const AXPlatformNodeTest &)=delete
~AXPlatformNodeTest() override
AXTreeUpdate BuildTextFieldWithSelectionRange(int32_t start, int32_t stop)
AXTreeUpdate BuildContentEditableWithSelectionRange(int32_t start, int32_t end)
void Init(const AXTreeUpdate &initial_state)
AXTreeUpdate BuildListBox(bool option_1_is_selected, bool option_2_is_selected, bool option_3_is_selected, const std::vector< ax::mojom::State > &additional_state)
AXPlatformNodeTest(const AXPlatformNodeTest &)=delete
AXTreeUpdate BuildAriaColumnAndRowCountGrids()
AXTreeUpdate Build3X3Table()