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

Unified Diff: cc/layers/layer_unittest.cc

Issue 2360003002: cc: Compute SurfacePropertyChanged without depending on owning layer (Closed)
Patch Set: Address review comment Created 4 years, 3 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/layers/layer_impl.cc ('k') | cc/layers/render_surface_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_unittest.cc
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index 6662c03f345b12ea80401f270fad5e43a6782d29..9d703c262b252ebc5496b79db5ac3272ea226deb 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -82,23 +82,6 @@ using ::testing::_;
grand_child->GetLayerTree()->LayerNeedsPushPropertiesForTesting( \
grand_child.get()));
-#define EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(code_to_test) \
- code_to_test; \
- root->GetLayerTree()->BuildPropertyTreesForTesting(); \
- EXPECT_TRUE(root->layer_property_changed()); \
- EXPECT_FALSE(root->subtree_property_changed()); \
- EXPECT_TRUE( \
- root->GetLayerTree()->LayerNeedsPushPropertiesForTesting(root.get())); \
- EXPECT_FALSE(child->layer_property_changed()); \
- EXPECT_FALSE(child->subtree_property_changed()); \
- EXPECT_FALSE( \
- child->GetLayerTree()->LayerNeedsPushPropertiesForTesting(child.get())); \
- EXPECT_FALSE(grand_child->layer_property_changed()); \
- EXPECT_FALSE(grand_child->subtree_property_changed()); \
- EXPECT_FALSE( \
- grand_child->GetLayerTree()->LayerNeedsPushPropertiesForTesting( \
- grand_child.get()));
-
namespace cc {
// This class is a friend of Layer, and is used as a wrapper for all the tests
@@ -1170,10 +1153,13 @@ TEST_F(LayerTest, LayerPropertyChangedForSubtree) {
grand_child->PushPropertiesTo(grand_child_impl.get()));
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1);
- EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(
+ EXECUTE_AND_VERIFY_SUBTREE_CHANGED(
root->SetBackgroundFilters(arbitrary_filters));
EXECUTE_AND_VERIFY_SUBTREE_CHANGES_RESET(
- root->PushPropertiesTo(root_impl.get()));
+ root->PushPropertiesTo(root_impl.get());
+ child->PushPropertiesTo(child_impl.get());
+ child2->PushPropertiesTo(child2_impl.get());
+ grand_child->PushPropertiesTo(grand_child_impl.get()));
gfx::PointF arbitrary_point_f = gfx::PointF(0.125f, 0.25f);
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1);
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/render_surface_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698