17 SetTree(std::make_unique<AXTree>(initial_state));
34 int32_t no_id = empty_data.
id;
37 update.nodes.push_back(node1);
38 if (node2.
id != no_id)
39 update.nodes.push_back(node2);
40 if (node3.
id != no_id)
41 update.nodes.push_back(node3);
42 if (node4.
id != no_id)
43 update.nodes.push_back(node4);
44 if (node5.
id != no_id)
45 update.nodes.push_back(node5);
46 if (node6.
id != no_id)
47 update.nodes.push_back(node6);
48 if (node7.
id != no_id)
49 update.nodes.push_back(node7);
50 if (node8.
id != no_id)
51 update.nodes.push_back(node8);
52 if (node9.
id != no_id)
53 update.nodes.push_back(node9);
54 if (node10.
id != no_id)
55 update.nodes.push_back(node10);
56 if (node11.
id != no_id)
57 update.nodes.push_back(node11);
58 if (node12.
id != no_id)
59 update.nodes.push_back(node12);
65 text_field_node.
id = 1;
68 text_field_node.
SetValue(
"How now brown cow.");
72 update.nodes.push_back(text_field_node);
80 text_field_node.
id = 1;
87 text_field_node.
SetValue(
"How now brown cow.");
91 update.nodes.push_back(text_field_node);
97 content_editable_node.
id = 1;
102 content_editable_node.
SetValue(
"How now brown cow.");
105 update.root_id = content_editable_node.
id;
106 update.nodes.push_back(content_editable_node);
114 content_editable_node.
id = 1;
121 content_editable_node.
SetValue(
"How now brown cow.");
124 update.root_id = content_editable_node.
id;
125 update.nodes.push_back(content_editable_node);
127 update.has_tree_data =
true;
128 update.tree_data.sel_anchor_object_id = content_editable_node.
id;
129 update.tree_data.sel_focus_object_id = content_editable_node.
id;
136AXTreeUpdate AXPlatformNodeTest::AXPlatformNodeTest::Build3X3Table() {
156 table.child_ids.push_back(50);
157 table.child_ids.push_back(2);
158 table.child_ids.push_back(10);
162 table_row_header.
id = 50;
164 table_row_header.
child_ids.push_back(51);
165 table_row_header.
child_ids.push_back(52);
166 table_row_header.
child_ids.push_back(53);
169 table_column_header_1.
id = 51;
177 table_column_header_2.
id = 52;
179 table_column_header_2.
SetName(
"column header 1");
186 table_column_header_3.
id = 53;
203 table_row_header_1.
id = 3;
205 table_row_header_1.
SetName(
"row header 1");
210 table_row_1.
child_ids.push_back(table_row_header_1.
id);
236 table_row_header_2.
id = 11;
246 table_row_2.
child_ids.push_back(table_row_header_2.
id);
249 table_cell_3.
id = 12;
258 table_cell_4.
id = 13;
274 update.nodes.push_back(table_row_header);
275 update.nodes.push_back(table_column_header_1);
276 update.nodes.push_back(table_column_header_2);
277 update.nodes.push_back(table_column_header_3);
279 update.nodes.push_back(table_row_1);
280 update.nodes.push_back(table_row_header_1);
281 update.nodes.push_back(table_cell_1);
282 update.nodes.push_back(table_cell_2);
284 update.nodes.push_back(table_row_2);
285 update.nodes.push_back(table_row_header_2);
286 update.nodes.push_back(table_cell_3);
287 update.nodes.push_back(table_cell_4);
301 root.child_ids.push_back(empty_grid.
id);
305 rowcolindex_grid.
id = 3;
307 root.child_ids.push_back(rowcolindex_grid.
id);
310 rowcolindex_row.
id = 4;
312 rowcolindex_grid.
child_ids.push_back(rowcolindex_row.
id);
315 rowcolindex_cell.
id = 5;
321 rowcolindex_row.
child_ids.push_back(rowcolindex_cell.
id);
325 rowcolcount_grid.
id = 6;
330 root.child_ids.push_back(rowcolcount_grid.
id);
341 root.child_ids.push_back(unknown_grid.
id);
346 update.nodes.push_back(empty_grid);
347 update.nodes.push_back(rowcolindex_grid);
348 update.nodes.push_back(rowcolindex_row);
349 update.nodes.push_back(rowcolindex_cell);
350 update.nodes.push_back(rowcolcount_grid);
351 update.nodes.push_back(unknown_grid);
356 bool option_1_is_selected,
357 bool option_2_is_selected,
358 bool option_3_is_selected,
359 const std::vector<ax::mojom::State>& additional_state) {
364 for (
auto state : additional_state)
371 if (option_1_is_selected)
379 if (option_2_is_selected)
387 if (option_3_is_selected)
393 update.nodes.push_back(listbox);
394 update.nodes.push_back(option_1);
395 update.nodes.push_back(option_2);
396 update.nodes.push_back(option_3);
void SetTree(std::unique_ptr< AXTree > tree)
const int32_t kUnknownAriaColumnOrRowCount
void AddState(ax::mojom::State state)
void AddIntAttribute(ax::mojom::IntAttribute attribute, int32_t value)
std::vector< int32_t > child_ids
void SetValue(const std::string &value)
void SetName(const std::string &name)
void AddStringAttribute(ax::mojom::StringAttribute attribute, const std::string &value)
void AddBoolAttribute(ax::mojom::BoolAttribute attribute, bool value)