| Index: ui/accessibility/ax_tree_unittest.cc
|
| diff --git a/ui/accessibility/ax_tree_unittest.cc b/ui/accessibility/ax_tree_unittest.cc
|
| index f4c609ed36b4cea2909302ada79aead060bc3aac..0001474577d1a873a8048670eaa6b1b73e103517 100644
|
| --- a/ui/accessibility/ax_tree_unittest.cc
|
| +++ b/ui/accessibility/ax_tree_unittest.cc
|
| @@ -103,6 +103,44 @@ TEST(AXTreeTest, SerializeSimpleAXTree) {
|
| dst_tree.ToString());
|
| }
|
|
|
| +TEST(AXTreeTest, SerializeAXTreeUpdate) {
|
| + AXNodeData list;
|
| + list.id = 3;
|
| + list.role = AX_ROLE_LIST;
|
| + list.state = 0;
|
| + list.child_ids.push_back(4);
|
| + list.child_ids.push_back(5);
|
| + list.child_ids.push_back(6);
|
| +
|
| + AXNodeData list_item_2;
|
| + list_item_2.id = 5;
|
| + list_item_2.role = AX_ROLE_LIST_ITEM;
|
| + list_item_2.state = 0;
|
| +
|
| + AXNodeData list_item_3;
|
| + list_item_3.id = 6;
|
| + list_item_3.role = AX_ROLE_LIST_ITEM;
|
| + list_item_3.state = 0;
|
| +
|
| + AXNodeData button;
|
| + button.id = 7;
|
| + button.role = AX_ROLE_BUTTON;
|
| + button.state = 0;
|
| +
|
| + AXTreeUpdate update;
|
| + update.nodes.push_back(list);
|
| + update.nodes.push_back(list_item_2);
|
| + update.nodes.push_back(list_item_3);
|
| + update.nodes.push_back(button);
|
| +
|
| + EXPECT_EQ(
|
| + "id=3 list (0, 0)-(0, 0) child_ids=4,5,6\n"
|
| + " id=5 list_item (0, 0)-(0, 0)\n"
|
| + " id=6 list_item (0, 0)-(0, 0)\n"
|
| + "id=7 button (0, 0)-(0, 0)\n",
|
| + update.ToString());
|
| +}
|
| +
|
| TEST(AXTreeTest, DeleteUnknownSubtreeFails) {
|
| AXNodeData root;
|
| root.id = 1;
|
|
|