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

Unified Diff: cc/layers/layer_position_constraint_unittest.cc

Issue 1416293005: Fix some unit tests that fail when we enable impl property trees (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 | « no previous file | cc/trees/layer_tree_host_common_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 594dac220a9667c2cf02747cceab8b9c772c422e..9c15a650845eaade892de270accff15a87ee65d9 100644
--- a/cc/layers/layer_position_constraint_unittest.cc
+++ b/cc/layers/layer_position_constraint_unittest.cc
@@ -224,6 +224,7 @@ TEST_F(LayerPositionConstraintTest,
// Case 2: scroll delta of 10, 10
child_impl_->SetScrollDelta(gfx::Vector2d(10, 10));
+ child_impl_->SetDrawsContent(true);
ExecuteCalculateDrawProperties(root_impl_);
// Here the child is affected by scroll delta, but the fixed position
@@ -277,6 +278,7 @@ TEST_F(LayerPositionConstraintTest,
// Case 1: scroll delta of 0, 0
child_impl_->SetScrollDelta(gfx::Vector2d(0, 0));
+ child_impl_->SetDrawsContent(true);
ExecuteCalculateDrawProperties(root_impl_);
gfx::Transform expected_child_transform;
@@ -361,6 +363,7 @@ TEST_F(LayerPositionConstraintTest,
// Case 1: scroll delta of 0, 0
child_impl_->SetScrollDelta(gfx::Vector2d(0, 0));
+ child_impl_->SetDrawsContent(true);
ExecuteCalculateDrawProperties(root_impl_);
gfx::Transform expected_child_transform;
@@ -451,6 +454,7 @@ TEST_F(LayerPositionConstraintTest,
// Case 2: scroll delta of 10, 30
child_impl_->SetScrollDelta(gfx::Vector2d(10, 30));
+ child_impl_->SetDrawsContent(true);
ExecuteCalculateDrawProperties(root_impl_);
// Here the grand_child remains unchanged, because it scrolls along with the
@@ -562,6 +566,7 @@ TEST_F(LayerPositionConstraintTest,
// Case 1: scroll delta of 0, 0
child_impl_->SetScrollDelta(gfx::Vector2d(0, 0));
+ child_impl_->SetDrawsContent(true);
ExecuteCalculateDrawProperties(root_impl_);
gfx::Transform expected_child_transform;
@@ -718,6 +723,7 @@ TEST_F(
// Case 1: scroll delta of 0, 0
child_impl_->SetScrollDelta(gfx::Vector2d(0, 0));
+ child_impl_->SetDrawsContent(true);
ExecuteCalculateDrawProperties(root_impl_);
gfx::Transform expected_child_transform;
@@ -899,6 +905,7 @@ TEST_F(LayerPositionConstraintTest,
// Case 1: scroll delta of 0, 0
child_impl_->SetScrollDelta(gfx::Vector2d(0, 0));
+ child_impl_->SetDrawsContent(true);
ExecuteCalculateDrawProperties(root_impl_);
gfx::Transform expected_child_transform;
@@ -969,6 +976,7 @@ TEST_F(LayerPositionConstraintTest,
// Case 1: scrollDelta
child_impl_->SetScrollDelta(gfx::Vector2d(10, 10));
+ child_impl_->SetDrawsContent(true);
ExecuteCalculateDrawProperties(root_impl_);
// Here the child is affected by scroll delta, but the fixed position
@@ -1033,7 +1041,9 @@ TEST_F(LayerPositionConstraintTest,
LayerImpl* fixed_to_container2 = container2->children()[0];
container1->SetScrollDelta(gfx::Vector2d(0, 15));
+ container1->SetDrawsContent(true);
container2->SetScrollDelta(gfx::Vector2d(30, 0));
+ container2->SetDrawsContent(true);
ExecuteCalculateDrawProperties(root_impl_);
gfx::Transform expected_container1_transform;
@@ -1079,6 +1089,7 @@ TEST_F(LayerPositionConstraintTest,
// Case 1: fixed-container size delta of 20, 20
scroll_layer_impl_->SetScrollDelta(gfx::Vector2d(10, 10));
+ scroll_layer_impl_->SetDrawsContent(true);
SetFixedContainerSizeDelta(scroll_layer_impl_, gfx::Vector2d(20, 20));
gfx::Transform expected_scroll_layer_transform;
expected_scroll_layer_transform.Translate(-10.0, -10.0);
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698