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

Unified Diff: cc/layers/layer_position_constraint_unittest.cc

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/layers/layer_lists.h ('k') | cc/layers/layer_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_position_constraint_unittest.cc
diff --git a/cc/layers/layer_position_constraint_unittest.cc b/cc/layers/layer_position_constraint_unittest.cc
index fab65da1de280c55a91fddafc45a22643c011169..ace3b03eecd255c7762a174841f322f42dbf14c8 100644
--- a/cc/layers/layer_position_constraint_unittest.cc
+++ b/cc/layers/layer_position_constraint_unittest.cc
@@ -155,14 +155,16 @@ class LayerPositionConstraintTest : public testing::Test {
grand_child_impl_->SetScrollDelta(gfx::Vector2dF());
}
root_impl_ = layer_tree_host_->CommitAndCreateLayerImplTree();
- inner_viewport_container_layer_impl_ = root_impl_->children()[0];
- scroll_layer_impl_ = inner_viewport_container_layer_impl_->children()[0];
- outer_viewport_container_layer_impl_ = scroll_layer_impl_->children()[0];
+ inner_viewport_container_layer_impl_ = root_impl_->children()[0].get();
+ scroll_layer_impl_ =
+ inner_viewport_container_layer_impl_->children()[0].get();
+ outer_viewport_container_layer_impl_ =
+ scroll_layer_impl_->children()[0].get();
child_transform_layer_impl_ =
- outer_viewport_container_layer_impl_->children()[0];
- child_impl_ = child_transform_layer_impl_->children()[0];
- grand_child_impl_ = child_impl_->children()[0];
- great_grand_child_impl_ = grand_child_impl_->children()[0];
+ outer_viewport_container_layer_impl_->children()[0].get();
+ child_impl_ = child_transform_layer_impl_->children()[0].get();
+ grand_child_impl_ = child_impl_->children()[0].get();
+ great_grand_child_impl_ = grand_child_impl_->children()[0].get();
}
protected:
@@ -564,7 +566,8 @@ TEST_F(LayerPositionConstraintTest,
fixed_position_child->SetTransform(rotation_about_z);
CommitAndUpdateImplPointers();
- LayerImpl* fixed_position_child_impl = great_grand_child_impl_->children()[0];
+ LayerImpl* fixed_position_child_impl =
+ great_grand_child_impl_->children()[0].get();
// Case 1: scroll delta of 0, 0
child_impl_->SetScrollDelta(gfx::Vector2d(0, 0));
@@ -660,7 +663,7 @@ TEST_F(LayerPositionConstraintTest,
// Case 4: Bottom-right fixed-position layer.
fixed_position_child->SetPositionConstraint(fixed_to_bottom_right_);
CommitAndUpdateImplPointers();
- fixed_position_child_impl = great_grand_child_impl_->children()[0];
+ fixed_position_child_impl = great_grand_child_impl_->children()[0].get();
child_impl_->SetScrollDelta(gfx::Vector2d(10, 30));
SetFixedContainerSizeDelta(child_impl_, gfx::Vector2d(20, 20));
ExecuteCalculateDrawProperties(root_impl_);
@@ -721,7 +724,8 @@ TEST_F(
fixed_position_child->SetTransform(rotation_about_z);
CommitAndUpdateImplPointers();
- LayerImpl* fixed_position_child_impl = great_grand_child_impl_->children()[0];
+ LayerImpl* fixed_position_child_impl =
+ great_grand_child_impl_->children()[0].get();
// Case 1: scroll delta of 0, 0
child_impl_->SetScrollDelta(gfx::Vector2d(0, 0));
@@ -1040,7 +1044,7 @@ TEST_F(LayerPositionConstraintTest,
LayerImpl* container1 = child_impl_;
LayerImpl* fixed_to_container1 = grand_child_impl_;
LayerImpl* container2 = great_grand_child_impl_;
- LayerImpl* fixed_to_container2 = container2->children()[0];
+ LayerImpl* fixed_to_container2 = container2->children()[0].get();
container1->SetScrollDelta(gfx::Vector2d(0, 15));
container1->SetDrawsContent(true);
« no previous file with comments | « cc/layers/layer_lists.h ('k') | cc/layers/layer_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698