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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 2616353003: Clarify property tree id-to-index map names. (Closed)
Patch Set: Sync to head. Created 3 years, 11 months 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 | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 820562a3d484c8d90cb382d339a93b329ff91448..928894823dbcc1fb8b7797a7093e8af7794273a0 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -822,81 +822,90 @@ class LayerTreeHostTestPushNodeOwnerToNodeIdMap : public LayerTreeHostTest {
void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
PropertyTrees* property_trees = impl->sync_tree()->property_trees();
auto root_transform_id_to_index =
- property_trees->transform_id_to_index_map.find(root_->id());
+ property_trees->layer_id_to_transform_node_index.find(root_->id());
auto child_transform_id_to_index =
- property_trees->transform_id_to_index_map.find(child_->id());
+ property_trees->layer_id_to_transform_node_index.find(child_->id());
auto root_effect_id_to_index =
- property_trees->effect_id_to_index_map.find(root_->id());
+ property_trees->layer_id_to_effect_node_index.find(root_->id());
auto child_effect_id_to_index =
- property_trees->effect_id_to_index_map.find(child_->id());
+ property_trees->layer_id_to_effect_node_index.find(child_->id());
auto root_clip_id_to_index =
- property_trees->clip_id_to_index_map.find(root_->id());
+ property_trees->layer_id_to_clip_node_index.find(root_->id());
auto child_clip_id_to_index =
- property_trees->clip_id_to_index_map.find(child_->id());
+ property_trees->layer_id_to_clip_node_index.find(child_->id());
auto root_scroll_id_to_index =
- property_trees->scroll_id_to_index_map.find(root_->id());
+ property_trees->layer_id_to_scroll_node_index.find(root_->id());
auto child_scroll_id_to_index =
- property_trees->scroll_id_to_index_map.find(child_->id());
+ property_trees->layer_id_to_scroll_node_index.find(child_->id());
switch (impl->sync_tree()->source_frame_number()) {
case 0:
// root_ should create every property tree node and child_ should not
// create any.
EXPECT_NE(root_transform_id_to_index,
- property_trees->transform_id_to_index_map.end());
+ property_trees->layer_id_to_transform_node_index.end());
EXPECT_EQ(root_transform_id_to_index->second,
root_->transform_tree_index());
EXPECT_NE(root_effect_id_to_index,
- property_trees->effect_id_to_index_map.end());
+ property_trees->layer_id_to_effect_node_index.end());
EXPECT_EQ(root_effect_id_to_index->second, root_->effect_tree_index());
EXPECT_NE(root_clip_id_to_index,
- property_trees->clip_id_to_index_map.end());
+ property_trees->layer_id_to_clip_node_index.end());
EXPECT_EQ(root_clip_id_to_index->second, root_->clip_tree_index());
EXPECT_NE(root_scroll_id_to_index,
- property_trees->scroll_id_to_index_map.end());
+ property_trees->layer_id_to_scroll_node_index.end());
EXPECT_EQ(root_scroll_id_to_index->second, root_->scroll_tree_index());
EXPECT_EQ(child_transform_id_to_index,
- property_trees->transform_id_to_index_map.end());
+ property_trees->layer_id_to_transform_node_index.end());
EXPECT_EQ(child_effect_id_to_index,
- property_trees->effect_id_to_index_map.end());
+ property_trees->layer_id_to_effect_node_index.end());
EXPECT_EQ(child_clip_id_to_index,
- property_trees->clip_id_to_index_map.end());
+ property_trees->layer_id_to_clip_node_index.end());
EXPECT_EQ(child_scroll_id_to_index,
- property_trees->scroll_id_to_index_map.end());
+ property_trees->layer_id_to_scroll_node_index.end());
break;
case 1:
// child_ should create a transfrom, clip, effect nodes but not a scroll
// node.
- EXPECT_NE(property_trees->transform_id_to_index_map.find(child_->id()),
- property_trees->transform_id_to_index_map.end());
+ EXPECT_NE(
+ property_trees->layer_id_to_transform_node_index.find(child_->id()),
+ property_trees->layer_id_to_transform_node_index.end());
EXPECT_EQ(child_transform_id_to_index->second,
child_->transform_tree_index());
- EXPECT_NE(property_trees->effect_id_to_index_map.find(child_->id()),
- property_trees->effect_id_to_index_map.end());
+ EXPECT_NE(
+ property_trees->layer_id_to_effect_node_index.find(child_->id()),
+ property_trees->layer_id_to_effect_node_index.end());
EXPECT_EQ(child_effect_id_to_index->second,
child_->effect_tree_index());
- EXPECT_NE(property_trees->clip_id_to_index_map.find(child_->id()),
- property_trees->clip_id_to_index_map.end());
+ EXPECT_NE(
+ property_trees->layer_id_to_clip_node_index.find(child_->id()),
+ property_trees->layer_id_to_clip_node_index.end());
EXPECT_EQ(child_clip_id_to_index->second, child_->clip_tree_index());
- EXPECT_EQ(property_trees->scroll_id_to_index_map.find(child_->id()),
- property_trees->scroll_id_to_index_map.end());
+ EXPECT_EQ(
+ property_trees->layer_id_to_scroll_node_index.find(child_->id()),
+ property_trees->layer_id_to_scroll_node_index.end());
break;
case 2:
// child_ should create a scroll node.
- EXPECT_NE(property_trees->scroll_id_to_index_map.find(child_->id()),
- property_trees->scroll_id_to_index_map.end());
+ EXPECT_NE(
+ property_trees->layer_id_to_scroll_node_index.find(child_->id()),
+ property_trees->layer_id_to_scroll_node_index.end());
EXPECT_EQ(child_scroll_id_to_index->second,
child_->scroll_tree_index());
break;
case 3:
// child_ should not create any property tree nodes.
- EXPECT_EQ(property_trees->transform_id_to_index_map.find(child_->id()),
- property_trees->transform_id_to_index_map.end());
- EXPECT_EQ(property_trees->effect_id_to_index_map.find(child_->id()),
- property_trees->effect_id_to_index_map.end());
- EXPECT_EQ(property_trees->clip_id_to_index_map.find(child_->id()),
- property_trees->clip_id_to_index_map.end());
- EXPECT_EQ(property_trees->scroll_id_to_index_map.find(child_->id()),
- property_trees->scroll_id_to_index_map.end());
+ EXPECT_EQ(
+ property_trees->layer_id_to_transform_node_index.find(child_->id()),
+ property_trees->layer_id_to_transform_node_index.end());
+ EXPECT_EQ(
+ property_trees->layer_id_to_effect_node_index.find(child_->id()),
+ property_trees->layer_id_to_effect_node_index.end());
+ EXPECT_EQ(
+ property_trees->layer_id_to_clip_node_index.find(child_->id()),
+ property_trees->layer_id_to_clip_node_index.end());
+ EXPECT_EQ(
+ property_trees->layer_id_to_scroll_node_index.find(child_->id()),
+ property_trees->layer_id_to_scroll_node_index.end());
EndTest();
break;
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698