Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: ui/accessibility/ax_tree_combiner_unittest.cc

Issue 2572923002: AXTreeCombiner no longer needs to convert to global coordinates. (Closed)
Patch Set: Fixed unittests Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/accessibility/ax_tree_combiner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_tree_combiner_unittest.cc
diff --git a/ui/accessibility/ax_tree_combiner_unittest.cc b/ui/accessibility/ax_tree_combiner_unittest.cc
index 49fbccc988f976d27bcd579cab78d9a6f65b6087..b80771d3bf08621e3af35ff8ce7526cb46642122 100644
--- a/ui/accessibility/ax_tree_combiner_unittest.cc
+++ b/ui/accessibility/ax_tree_combiner_unittest.cc
@@ -149,57 +149,6 @@ TEST(CombineAXTreesTest, MapAllIdAttributes) {
AX_ATTR_UNIQUE_CELL_IDS)[0]);
}
-TEST(CombineAXTreesTest, Coordinates) {
- AXTreeUpdate parent_tree;
- parent_tree.has_tree_data = true;
- parent_tree.tree_data.tree_id = 1;
- parent_tree.root_id = 1;
- parent_tree.nodes.resize(3);
- parent_tree.nodes[0].id = 1;
- parent_tree.nodes[0].child_ids.push_back(2);
- parent_tree.nodes[0].child_ids.push_back(3);
- parent_tree.nodes[1].id = 2;
- parent_tree.nodes[1].role = AX_ROLE_BUTTON;
- parent_tree.nodes[1].location = gfx::RectF(50, 10, 200, 100);
- parent_tree.nodes[2].id = 3;
- parent_tree.nodes[2].role = AX_ROLE_IFRAME;
- parent_tree.nodes[2].AddIntAttribute(AX_ATTR_CHILD_TREE_ID, 2);
-
- AXTreeUpdate child_tree;
- child_tree.has_tree_data = true;
- child_tree.tree_data.parent_tree_id = 1;
- child_tree.tree_data.tree_id = 2;
- child_tree.root_id = 1;
- child_tree.nodes.resize(2);
- child_tree.nodes[0].id = 1;
- child_tree.nodes[0].child_ids.push_back(2);
-
- child_tree.nodes[0].transform.reset(new gfx::Transform());
- child_tree.nodes[0].transform->Translate(0, 300);
- child_tree.nodes[0].transform->Scale(2.0, 2.0);
-
- child_tree.nodes[1].id = 2;
- child_tree.nodes[1].role = AX_ROLE_BUTTON;
- child_tree.nodes[1].location = gfx::RectF(50, 10, 200, 100);
-
- AXTreeCombiner combiner;
- combiner.AddTree(parent_tree, true);
- combiner.AddTree(child_tree, false);
- combiner.Combine();
-
- const AXTreeUpdate& combined = combiner.combined();
-
- ASSERT_EQ(5U, combined.nodes.size());
- EXPECT_EQ(50, combined.nodes[1].location.x());
- EXPECT_EQ(10, combined.nodes[1].location.y());
- EXPECT_EQ(200, combined.nodes[1].location.width());
- EXPECT_EQ(100, combined.nodes[1].location.height());
- EXPECT_EQ(100, combined.nodes[4].location.x());
- EXPECT_EQ(320, combined.nodes[4].location.y());
- EXPECT_EQ(400, combined.nodes[4].location.width());
- EXPECT_EQ(200, combined.nodes[4].location.height());
-}
-
TEST(CombineAXTreesTest, FocusedTree) {
AXTreeUpdate parent_tree;
parent_tree.has_tree_data = true;
« no previous file with comments | « ui/accessibility/ax_tree_combiner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698